TikZ를 사용하는 각도와 동일한 pgfplot을 사용하여 각도 그리기

TikZ를 사용하는 각도와 동일한 pgfplot을 사용하여 각도 그리기

나는 pgfplots를 사용하여 교차하는 선을 그립니다. 이 교차선으로 세 개의 직각삼각형이 만들어집니다. 그 중 두 개가 세 번째에 있습니다. 나는 및 TikZ명령을 사용 하여 만든 표시로 더 작은 직각 삼각형에 두 쌍의 예각을 표시하려고 하며 명령을 사용 하여 만든 동일한 표시로 모든 직각을 표시하려고 합니다 . 다음 코드에서 예각을 어떻게 표시합니까? 와 달리 직각 표시를 수동으로 만들어야 한다는 것을 알고 있습니다. 로 만든 직각 표시의 각 변의 길이는 얼마입니까 ? (다른 페이지에는 로 직각 삼각형을 그렸습니다 . 표기법을 동일하게 하고 싶습니다.)\tkzMarkAngle[size=0.5cm,mark=|](B,A,P);\tkzMarkAngle[size=0.5cm,mark=||](A,B,P);TikZ\tkzMarkRightAngle(A,P,B);TikZTikZTikZ

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{mathtools,systeme,array}

\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}



\begin{document}

\noindent \hspace*{\fill}
\begin{tikzpicture}
\begin{axis}[width=6in,axis equal image,clip=false,
    axis lines=middle,
    xmin=-5,xmax=10,samples=501,
    xlabel=$x$,ylabel=$y$,
    ymin=-8,ymax=11,
    restrict y to domain=-8:11,
    enlargelimits={abs=0.25cm},
    axis line style={latex-latex},
    ticklabel style={font=\tiny,fill=white},
    xtick={\empty},ytick={\empty},
    xlabel style={at={(ticklabel* cs:1)},anchor=north west},
    ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=501, latex-latex,domain=-5:10,blue] {x + 1} node[anchor=north west,pos=0.9,font=\footnotesize]{$y = mx + b$};
\addplot[samples=501, latex-latex,domain=-5:10,blue] {3 - x} node[anchor=south west,pos=0.9,font=\footnotesize]{$y = m^{\prime}x + b^{\prime}$};
\addplot [dashed, latex-latex,domain=-21:21] (6,x) node [pos=0.1, anchor=north, font=\footnotesize, sloped]{$x=x_{\circ}$};
\addplot [dashed, domain=1:6] {2};
(1,2) coordinate (B);
\draw [fill] (1,2) circle [radius=1.5pt] node[label=above:$B$]{};
(6,-3) coordinate (A);
\draw [fill] (6,-3) circle [radius=1.5pt] node[label=right:$A$]{};
(6,7) coordinate (C);
\draw [fill] (6,7) circle [radius=1.5pt] node[label=right:$C$]{};
(6,2) coordinate (P);
\draw [fill] (6,2) circle [radius=1.5pt] node[label=right:$P$]{};
\end{axis}
\end{tikzpicture}
\hspace{\fill}
\vskip0.25in

\end{document}

답변1

환경 내부에서 명명된 노드를 사용한 axis다음 외부에 각도 표시를 그립니다 axis.

\documentclass[10pt]{amsart}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[
  dot/.style={circle,fill,inner sep=1.5pt,}
  ]
\begin{axis}[width=6in,axis equal image,clip=false,
    axis lines=middle,
    xmin=-5,xmax=10,samples=501,
    xlabel=$x$,ylabel=$y$,
    ymin=-8,ymax=11,
    restrict y to domain=-8:11,
    enlargelimits={abs=0.25cm},
    axis line style={latex-latex},
    ticklabel style={font=\tiny,fill=white},
    xtick={\empty},ytick={\empty},
    xlabel style={at={(ticklabel* cs:1)},anchor=north west},
    ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=501, latex-latex,domain=-5:10,blue] {x + 1} node[anchor=north west,pos=0.9,font=\footnotesize]{$y = mx + b$};
\addplot[samples=501, latex-latex,domain=-5:10,blue] {3 - x} node[anchor=south west,pos=0.9,font=\footnotesize]{$y = m^{\prime}x + b^{\prime}$};
\addplot [dashed, latex-latex,domain=-21:21] (6,x) node [pos=0.1, anchor=north, font=\footnotesize, sloped]{$x=x_{\circ}$};
\addplot [dashed, domain=1:6] {2};
\path
  (1,2)node[dot,label=above:$B$](B){}
  (6,-3)node[dot,label=right:$A$](A){}
  (6,7)node[dot,label=right:$C$](C){}
  (6,2)node[dot,label=right:$P$](P){};
\end{axis}
\tkzMarkAngle[size=0.5cm,mark=|](P,A,B);
\tkzMarkAngle[size=0.5cm,mark=||](A,B,P);
\tkzMarkRightAngle(A,P,B);
\end{tikzpicture}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보