JuliaTeX / PGFPlots.jl

This library uses the LaTeX package pgfplots to produce plots.
Other
187 stars 36 forks source link

Legend for a group of plots #64

Open pevnak opened 7 years ago

pevnak commented 7 years ago

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

mykelk commented 7 years ago

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)?

pevnak commented 7 years ago

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

mykelk commented 7 years ago

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