2

I'd like to legend only certain curves but \addlegendentry add an entry for each curve, in sequence.

\documentclass{article}
\usepackage{tikz,pgfplots}

\begin{document}
\begin{tikzpicture}
  \begin{axis}[xmin=0,xmax=5]
    \addplot {x};
    \addplot {x^2};
    \addlegendentry{square};
  \end{axis}
\end{tikzpicture}

\end{document}

How can I skip the legend for the first curve so that only the x^2 curve gets the "square" label.

wilk
  • 959

0 Answers0