答案1
朴素的Tikz
背景
\draw [help lines] (-5,-5) grid (5,5);
原点位于(-5,-5)
5*5 网格
对于轴
\draw [<->,line width=2pt, red] %arrow on both sides
(0,-4). %start point for the axis
node[right]{$y$} %label on the right side
node[left]{$y1$}-- %label on the left side
(0,4) %end point for the axis
node[left]{$x1$} %label on the left side
node[right]{$x1$};%label on the right side
对于蜱虫
\foreach \i in {-3,-2,...,3} \draw [line width=2pt, blue](\i,-.1)--(\i,.1);%ticks starting from -3 to 3 horizontal axis
\foreach \z in {-3,-2,...,3} \draw [line width=2pt, blue](-.1, \z)--(.1, \z);%ticks starting from -3 to 3 vertical axis
对于相交于(-2,3)
\draw [thick, line width=2pt, dashed] (-2,0) |- (0,3) ;
对于交叉口处的圆
\draw [thick, line width=2pt, dashed] (-2,0) |-
node[
circle,
fill=black,
inner sep=0pt, minimum size=6pt,
] {}
(0,3) ;
对于相交处的倾斜标签
\draw [thick, line width=2pt, dashed] (-2,0) |-
node[
circle,
fill=black,
inner sep=0pt, minimum size=6pt,
label={
[label distance=0.2cm,
rotate=45]
above:(-2,3)}] {}
(0,3) ;
完成 MWE
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[scale=1,]
\draw [help lines] (-5,-5) grid (5,5);
\draw [<->,line width=2pt, red]
(0,-4)
node[right]{$y$}
node[left]{$y1$}--
(0,4)
node[left]{$x1$}
node[right]{$x1$};
\draw [<->, line width=2pt, red]
(-4,0)
node[above]{$y$}
node[below]{$y1$}--
(4,0)
node[above]{$x$}
node[below]{$x1$};
\foreach \i in {-3,-2,...,3} \draw [line width=2pt, blue](\i,-.1)--(\i,.1);
\foreach \z in {-3,-2,...,3} \draw [line width=2pt, blue](-.1, \z)--(.1, \z);
\draw [thick, line width=2pt, dashed] (-2,0) |-
node[
circle,
fill=black,
inner sep=0pt, minimum size=6pt,
label={
[label distance=0.2cm,
rotate=45]
above:(-2,3)}] {}
(0,3) ;
\end{tikzpicture}
\end{document}