如何在圆盘周围写一些文字?

如何在圆盘周围写一些文字?

我想知道如何在圆盘周围写一些文字?我的圆盘是这样的:

\documentclass[border=5pt]{standalone}
\usepackage{tikz} 
\usetikzlibrary{calc} 
\begin{document} 
\begin{tikzpicture} 
\def\NumSpokes{8} 
\def\InnerR{2.9} 
\def\OuterR{3} 
\draw (0,0) circle (\OuterR); \foreach \k in {1,...,\NumSpokes}
{% 
\draw (\k*360/\NumSpokes:\InnerR) -- (\k*360/\NumSpokes:\OuterR+0.1)         ; } 
\foreach \k in {3,6,7}{%
\fill[black] (\k*360/\NumSpokes:\OuterR) circle (0.1);
}
\end{tikzpicture} 
\end{document}
\end{document}

我想知道是否可以通过在主磁盘周围和外部用简单的“{”表示“L1”和“L2”来显示第一个和第二个黑色圆圈之间的距离(例如“L1”),以及第二个和第三个黑色圆圈之间的距离(“L2”)。

答案1

使用这里的@Qrrbrbirlbel 的答案:https://tex.stackexchange.com/a/82930/120578我懂了:

\documentclass[border=5pt]{standalone}
\usepackage{tikz} 
\usetikzlibrary{calc} 
\usetikzlibrary{decorations.pathreplacing}

\makeatletter 

\usetikzlibrary{arrows}
\newcommand*{\braceme}[6][]{% #1 = optional
                            % #2 = radius
                            % #3 = start angle
                            % #4 = end angle
                            % #5 = node name
                            % #6 = node content
\draw[
    shift={(#3:#2)},
    right to reversed-right to reversed,
    shorten >=-.75\pgflinewidth,
    #1
    ] (0,0)
        arc[radius=#2, start angle=#3, end angle=#3+(#4-#3)/2] node[rotate=#3+(#4-#3)/2-90,above=2pt] (#5) {#6};
\draw[
    shift={({#3+(#4-#3)/2}:#2)},
    left to reversed-left to reversed,
    shorten <=-.75\pgflinewidth,
    #1
    ] (0,0)
        arc[radius=#2, start angle=#3+(#4-#3)/2, end angle=#4];
}


\begin{document} 
\begin{tikzpicture} 
\def\NumSpokes{8} 
\def\InnerR{2.9} 
\def\OuterR{3} 
\draw (0,0) circle (\OuterR); \foreach \k in {1,...,\NumSpokes}
{% 
\draw (\k*360/\NumSpokes:\InnerR) -- (\k*360/\NumSpokes:\OuterR+0.1) ; } 
\foreach \k in {3,6,7}{%
\fill[black] (\k*360/\NumSpokes:\OuterR) circle (0.1) ;
\coordinate (Cir\k) at (\k*360/\NumSpokes:\OuterR) ;
}

\draw[dashed] (3*360/\NumSpokes:3)--(3*360/\NumSpokes:3.5);
\draw[dashed] (6*360/\NumSpokes:3)--(6*360/\NumSpokes:3.5);
\draw[dashed] (7*360/\NumSpokes:3)--(7*360/\NumSpokes:3.5);

\braceme[thick,red]{3.5}{6*360/\NumSpokes}{7*360/\NumSpokes}{br2}{$L_1$}
\braceme[thick,blue]{3.5}{3*360/\NumSpokes}{6*360/\NumSpokes}{br2}{$L_1$}

\end{tikzpicture} 
\end{document}

在此处输入图片描述

这样你还可以吗?

相关内容