1

I'm creating a picture through tikz package. It shows a eight spoke wagon wheel at two different frames. How can I add the legend __ Frame 1 and ....Frame 2? When I try to use \addlegendentry it gives me an error. Thanks in advance

 \documentclass[10pt,a4paper]{report}
 \usepackage{tikz}

 \begin{document}
   \begin{tikzpicture}[scale=3]
   \draw (0,0) circle (1cm);

   \draw (0:1cm) -- (180:1cm);
   \draw (45:1cm) -- (225:1cm);
   \draw (90:1cm) -- (270:1cm);
   \draw (135:1cm) -- (315:1cm);

   \draw[dotted] (7.5:1cm) -- (187.5:1cm);
   \draw[dotted] (52.5:1cm) -- (232.5:1cm);
   \draw[dotted] (97.5:1cm) -- (277.5:1cm);
   \draw[dotted] (142.5:1cm) -- (322.5:1cm);
   \end{tikzpicture}
 \end{document}
Zarko
  • 296,517
Alex
  • 11

1 Answers1

1

Like this?

enter image description here

your question is not very clear, so this can be only starting point... MWE, which gives above image is:

\documentclass[10pt,a4paper]{report}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
    \begin{tikzpicture}[scale=3]
\node (n1) [circle,draw,minimum size=6cm] {};% node size can not be scaled
\node (n2) [draw,right=of n1,align=left] {- - - frame 1 \dots\\
                                          -----frame 2 \dots};  
\draw   (  0:1) -- (180:1)
        ( 45:1) -- (225:1)
        ( 90:1) -- (270:1)
        (135:1) -- (315:1);
\draw[dotted] 
        (  7.5:1) -- (187.5:1)
        ( 52.5:1) -- (232.5:1)
        ( 97.5:1) -- (277.5:1)
        (142.5:1) -- (322.5:1);
    \end{tikzpicture}
\end{document}
Zarko
  • 296,517
  • Thanks like that. This is already fine but why if I would like to use \addlegendentry it does not work? – Alex Sep 10 '16 at 15:15
  • I told you, that this command doesn't belong to TikZ. If you like to stick with it, you should use pgfplots. – Zarko Sep 10 '16 at 15:28