using Gadfly, DataFrames
x=[1,2,3,4,5,6]
y=[6,5,4,3,2,1]
group=[“a”, “b”, “a”, “b”,“a”, “b”]
df=DataFrame(x=x, y=y, group=group)
Gadfly.plot(df, x=:x,
y=:y,
color=:group,
Geom.point,
Theme(background_color=“ghostwhite”,
point_size=6pt))
I would like to set the color of “a” and “b” to “lightsalmon” and “gold” respectively. The Gadfly documentation indicates the following:
Colors can also be specified explicitly for each data point with a vector of colors of length(x). A vector of length one specifies the color to use for all points. Default is Theme.default_color
How is this implemented? Thank you for the help!