Skip to content

Scatter Classes Legend Fill #120

Description

@bjack205

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"])

Screenshot from 2019-07-12 18-38-02

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions