从 pgf 中的图形标签中删除线条

从 pgf 中的图形标签中删除线条

我使用以下代码制作了一个图表:

\begin{tikzpicture}
  \begin{axis}[
    trig format plots=rad,
    axis lines = middle,
    enlargelimits,
    clip=false,
    ticks=none
    ]
    \addplot[domain=0:2*pi,samples=100,brown] {sin(x)} node [pos=0.25,pin={90:$\mathbf{F}_{bs}$},inner sep=0pt] {};
    \addplot[domain=0:2*pi,samples=100,black] {sin(x-(2*pi)/3)} node [pos=0.57,pin={90:$\mathbf{F}_{cs}$},inner sep=0pt] {};
    \addplot[domain=0:2*pi,samples=100,gray] {sin(x+(2*pi)/3)} node [pos=0.925,pin={90:$\mathbf{F}_{as}$},inner sep=0pt] {};
  \end{axis}
\end{tikzpicture}

这将产生以下内容:

在此处输入图片描述

我想删除连接绘图和标签的线。可以吗?

答案1

选项pin可以替换为label

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
\begin{tikzpicture}
  \begin{axis}[
    trig format plots=rad,
    axis lines = middle,
    enlargelimits,
    clip=false,
    ticks=none
    ]
    \addplot[domain=0:2*pi,samples=100,brown] {sin(x)} node
    [pos=0.25,label={90:$\mathbf{F}_{bs}$},inner sep=0pt] {};
    \addplot[domain=0:2*pi,samples=100,black] {sin(x-(2*pi)/3)} node
    [pos=0.57,label={90:$\mathbf{F}_{cs}$},inner sep=0pt] {};
    \addplot[domain=0:2*pi,samples=100,gray] {sin(x+(2*pi)/3)} node
    [pos=0.925,label={90:$\mathbf{F}_{as}$},inner sep=0pt] {};
  \end{axis}
\end{tikzpicture}
\end{document}

结果

相关内容