本文轉載自【微信公眾號:覓寧參考,ID:MeaningEducation】經微信公眾號授權轉載,如需轉載與原文作者聯繫
1
效果圖
2
代碼
下面代碼直接運行就可以了
% !TeX TS-program = xelatex
\documentclass{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}
\draw[->] (-5.5,0)--(5.5,0);
\foreach \x in {-5,-4,...,5}
\draw (\x,0.2)--(\x,0)node[below]{$\x$};
\draw(-3,0)--(-3,1)--(5,1);
\draw(2,0)--(2,1.5)--(-5,1.5);
\draw[fill=blue!10] (2,0)--(2,1)--(-3,1)--(-3,0);
\draw[fill=white] (2,0) circle (0.05);
\node at (0,3){};
\end{tikzpicture}
\end{document}