[Tex/LaTex] Draw angle between two lines in a circle

angleplottikz-pgf

I'm trying to draw an angle between two lines.

I have this code so far, but i cant draw a angle. How do I do it? I'm using PGF/TikZ.

\begin{figure}
   \begin{tikzpicture}
      \begin{axis}[
         ticks=none,
         axis lines = middle,
         axis line style={->},
         ymin=-1.5, ymax=1.5,
         xmin=-1.5, xmax=1.5,
         axis equal]
         \addplot[black, domain=0:0.7071] {x};
         \draw[black] (axis cs:0,0) circle [radius=1];
      \end{axis}
   \end{tikzpicture}
\end{figure}

Thanks.

Best Answer

The arc operation can be used here. The general syntax as recommended by the TikZ/PGF manual (thanks to @Tobi for the comment) is

\draw (<starting point>) arc [<options>];

with these options:

  • radius=<dim>
  • x radius=<dim>
  • y radius=<dim>
  • start angle=<deg>
  • end angle=<deg>
  • delta angle=<deg>

or a less readable version

\draw (<starting point>) arc (<start angle>:<end angle>:<radius>);

where <radius> can be a single length or <dim> and <dim> for different radii.

Code

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      ticks=none,
      axis lines = middle,
      axis line style={->},
      ymin=-1.5, ymax=1.5,
      xmin=-1.5, xmax=1.5,
    axis equal]
    \addplot[black, domain=0:0.7071] {x};
    \draw[black] (axis cs:0,0) circle [radius=1];
    \draw (axis cs:.125,0)arc[radius=.25cm,start angle=0,end angle=45];
    % \draw (axis cs:.125,0)arc(0:45:.25cm); % same as above with different syntax
  \end{axis}
\end{tikzpicture}  
\end{document}

Output

enter image description here