pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
200 stars 35 forks source link

Document initial value of "cycle list name" #371

Open muzimuzhi opened 4 years ago

muzimuzhi commented 4 years ago

cycle list name is initialized with color, which is not documented. https://github.com/pgf-tikz/pgfplots/blob/324e29dbdf7cd21dccaff201e35ffdb0558c43c0/tex/generic/pgfplots/pgfplots.code.tex#L2454

Proposed change (which can be quickly formed to a PR once Christian Feuersaenger is back):

diff --git a/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex b/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex
index cd3596af..0c53110c 100644
--- a/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex
+++ b/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex
@@ -2527,7 +2527,7 @@ target pos={10,100,200,500,1000,1100,1200,1500,2000,2895}
 \subsection{Cycle Lists -- Options Controlling Line Styles}
 \label{sec:cycle:list}

-\begin{pgfplotskeylist}{cycle list=\marg{list},cycle list name=\marg{name}}
+\begin{pgfplotskeylist}{cycle list=\marg{list},cycle list name=\marg{name} (initially |color|)}
     Allows to specify a list of plot specifications which will be used for each
     \hbox{|\addplot|} command without explicit plot specification. Thus, the
     currently active |cycle list| will be used if you write either

Why and how this change would help

Next entry of currently used cycle list is

which might confuse users about why \begin{axis}[samples=10] \addplot ...; \end{axis} and \begin{axis} \addplot[samples=10] ...; \end{axis} produce different plots. It actually confused me when answering this question.

With initial value of cycle list name documented, it at least helps careful users who are willing to read the doc. It will help more users if the differences between \addplot and \addplot[] are documented more explicitly.

muzimuzhi commented 4 years ago

It seems there are similar problems in other keys, for example error bars/error mark and error bars/error mark/error mark options.

https://github.com/pgf-tikz/pgfplots/blob/324e29dbdf7cd21dccaff201e35ffdb0558c43c0/tex/generic/pgfplots/pgfplots.code.tex#L3146-L3147