PGFPlots.jl
PGFPlots.jl copied to clipboard
Scatter Classes Legend Fill
I'm having an issue with the scatter classes field. Here's the example from the documentation:
x = 1:10
y = 2x
z = ["a", "a", "a", "b", "b", "b", "b", "c", "c", "c"]
sc = "{a={mark=square,orange},b={mark=triangle,red},c={mark=o,black}}"
Plots.Scatter(x, y, z, scatterClasses=sc, legendentry=["A", "B", "C"])
This plots just fine; however, if the markers are filled in then the legend markers are filled in blue:
z = ["a", "a", "a", "b", "b", "b", "b", "c", "c", "c"]
sc = "{a={mark=square*,blue},b={mark=triangle*,red},c={mark=o*,black}}"
Plots.Scatter(x, y, z, scatterClasses=sc, legendentry=["A", "B", "C"])
I'm very new to PGFPlots, but I did find that changing the \addplot+[...]
to \addplot[...]
(avoiding \addplot+
per the documentation) fixes the issue. Not sure if that's an easy fix in PGFPlots.jl, though.
Thanks!
Thank you for filing this issue. I think you can just change the addplot+
commands in the function plotHelper(o::IO, p::Scatter)
in src/PGFPlots.jl
. If that does the trick for you, please file a PR and let's get it merged in!