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/
187 stars 33 forks source link

Allow modifying `line legend` #477

Open schtandard opened 1 month ago

schtandard commented 1 month ago

line legend is protected from modification, a unique provision as far as I can tell. This is surprising and I can't see a good reason for it. What's more, it does not seem to be mentioned in the documentation. On the contrary, the documentation mentions its "initial value", implying that it may be changed.

One can of course define styles with a different name and use those. However, if a document uses different styles but resets to line legend in various places, changing that specific style is a natural need.

Tweaking the documentation would be necessary, as line legend would not be guaranteed to reset the legend image settings to their initial value. Maybe a hint that one has to execute line legend after changing it would also be nice.

If you approve of this change but prefer help with realizing it I can prepare a quick PR.