3

I am trying to create a tikz picture with pgfplots featuring an angle with the tkz-euclide package. However, after much difficulty, I am unable to compile the latex document.

I tried changing the paramaters within the path. Nothing seems to be working. Removal of the \tkzMarkAnglesize=0.5cm,mark=|; line will allow the code to work but the angle obviously won't show up.

\begin{figure}[ht]
\begin{center}
    \tikzset{every picture/.style={xscale=1,yscale=1}}
\begin{tikzpicture}
    \begin{axis}[
    domain=0:8,
    xmin=0, xmax=8,
    ymin=0, ymax=8,
    samples=400,
    yticklabels={,,},
    xticklabels={,,},
    ticks=none,
    axis y line=center,
    axis x line=middle,
    xscale=2, yscale=1.5,
    clip=false,
    ]
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates
    {(0,3) (8,7)};
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates
    {(6,6) (8,6)};
    \path
        (8,7)node(A){}
        (6,6)node(B){}
        (8,6)node(C){};
    \tkzMarkAngle[size=0.5cm,mark=|](A,B,C);    
    \node[label={180:{$\theta_H$}},circle,fill,inner sep=0pt] at (axis cs:0,3) {};
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates
    {(0,1) (8,3)};
    \node[label={180:{$\theta_L$}},circle,fill,inner sep=0pt] at (axis cs:0,1) {};
    \end{axis}
\end{tikzpicture}
\end{center}
\end{figure}

Error: No shape named B is known

Here is a minimal working example (upon request):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepackage{tkz-euclide}
\usepackage{tikz}
\usetkzobj{all}

\begin{document}
\begin{figure}[ht]
\begin{center}
\tikzset{every picture/.style={xscale=1,yscale=1}}
\begin{tikzpicture}
    \begin{axis}[
    domain=0:8,
    xmin=0, xmax=8,
    ymin=0, ymax=8,
    samples=400,
    yticklabels={,,},
    xticklabels={,,},
    ticks=none,
    axis y line=center,
    axis x line=middle,
    xscale=2, yscale=1.5,
    clip=false,
    ]
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates {(0,3) (8,7)};
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates {(6,6) (8,6)};
    \path
        (8,7)node(A){}
        (6,6)node(B){}
        (8,6)node(C){};
    \node[label={180:{$\theta_H$}},circle,fill,inner sep=0pt] at (axis cs:0,3) {};
    \addplot+[thick, smooth, mark=none, color=black, width=0.1in] plot coordinates {(0,1) (8,3)};
    \node[label={180:{$\theta_L$}},circle,fill,inner sep=0pt] at (axis cs:0,1) {};
    \end{axis}
\end{tikzpicture}
\end{center}
\end{figure}
\end{document}

0 Answers0