2

I want the angle label gamma to have a larger radius, but the radius parameter won't change anything. Here is my code

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary[topaths]
\usetikzlibrary{calc,patterns,angles,quotes}
\begin{document}
    \begin{tikzpicture}
        \node[draw,fill=white,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (1) at (0,0) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (2) at (0,2) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (3) at (-2,2) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (4) at (-2,0) {};

        \path[][thick,above, font=\scriptsize] (1) edge node {} (2);
        \path[][thick,above, font=\scriptsize] (2) edge node {} (3);
        \path[][thick,above, font=\scriptsize] (3) edge node {} (4);
        \path[][thick,above, font=\scriptsize] (4) edge node {} (1);

        \node[draw,fill=white,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (11) at (0,0) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (22) at (-0.8452,1.8126) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (33) at (-2.6579,0.9674) {};
        \node[draw,fill=black,circle,inner sep=0.05cm,minimum width = 8,font=\scriptsize] (44) at (-1.8126,-0.8452) {};

        \path[][thick,dashed,above, font=\scriptsize] (11) edge node {} (22);
        \path[][thick,dashed,above, font=\scriptsize] (22) edge node {} (33);
        \path[][thick,dashed,above, font=\scriptsize] (33) edge node {} (44);
        \path[][thick,dashed,above, font=\scriptsize] (44) edge node {} (11);

        \pic [draw, radius=5cm, ->, "$\gamma$", angle eccentricity=1.5] {angle = 2--11--22};
    \end{tikzpicture}
\end{document}

1 Answer 1

3

The parameter is named angle radius, not radius, so

\pic [draw, angle radius=1cm, ->, "$\gamma$", angle eccentricity=1.5] {angle = 2--11--22};

Alternative method for drawing something like that. Note that the topaths library is loaded automatically by TikZ, so you don't have to do that yourself.

output of code

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,angles,quotes}
\begin{document}
    \begin{tikzpicture}[
        dot/.style={draw,fill=black,circle,inner sep=0.05cm,minimum width = 8pt,font=\scriptsize},
        circ/.style={dot,fill=white},
    ]
        \node[circ] (1) at (0,0) {};
        \node[dot] (2) at (0,2) {};
        \node[dot] (3) at (-2,2) {};
        \node[dot] (4) at (-2,0) {};

        \begin{scope}[rotate around={35:(1.center)}]
        \node[circ] (11) at (0,0) {};
        \node[dot] (22) at (0,2) {};
        \node[dot] (33) at (-2,2) {};
        \node[dot] (44) at (-2,0) {};
        \end{scope}

        \foreach [remember=\i as \j (initially 4)] \i in {1,...,4}
         {
          \draw [thick] (\j) -- (\i);  
          \draw [thick,dashed] (\j\j) -- (\i\i);
         }

        \pic [draw, angle radius=1cm, ->, "$\gamma$", angle eccentricity=1.5] {angle = 2--11--22};
    \end{tikzpicture}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .