无法增加两条线之间的角度半径

无法增加两条线之间的角度半径

我希望角度标签 gamma 具有更大的半径,但该radius参数不会改变任何东西。这是我的代码

\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

该参数已命名angle radius,而不是radius,因此

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

绘制类似内容的替代方法。请注意,该topaths库由 TikZ 自动加载,因此您不必自己执行此操作。

代码输出

\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}

相关内容