PGFPlots.jl icon indicating copy to clipboard operation
PGFPlots.jl copied to clipboard

Legend for a group of plots

Open pevnak opened this issue 8 years ago • 3 comments

Hi Sisl, I would appreciate the possibility to plot a single legend for a groups of plots, as it is for example shown here: http://pgfplots-features.706524.n3.nabble.com/Pgfplots-features-groupplot-legend-outside-of-an-axis-and-externalizing-everything-td1676716.html I was able to almost implement it with the current status, but I have failed to add \ref{named} after the \end{tikzfigure}

Otherwise, I enjoy using your package. #enhan

pevnak avatar Dec 16 '16 12:12 pevnak

I think this would be a nice feature to have. What would you like the interface to look like (i.e., what commands would you want the user to type into PGFPlots.jl to produce this legend)?

mykelk avatar Dec 17 '16 03:12 mykelk

Hi, it was sort of "hacky". in the string legendentry I had "label1,label2,label3,...,labeln,", therefore below I chop off trailing comma. p.style="legend entries={"legendentry[1:end-1]"},legend to name=named I put this into the Axis description. Then, after the tikz picture is closed, I need to put \ref{named} to render the legend. Tomas

pevnak avatar Dec 19 '16 11:12 pevnak

Right. But what would you like it to look like? And then we'll try to make an interface to accommodate it.

mykelk avatar Dec 19 '16 16:12 mykelk