You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Showing colors on a graph but not on the legend is inconsistent. My preference would be to show the colors on the legend as well as the main plot. I suppose black everywhere would also be a answer.
Here is the short script to demonstrate the issue:
importpandas, plotninefromplotnine.dataimportdiamonds# NB: shapes used by geom_point are defined in plotnine/scales/scale_shape.pyg0=plotnine.ggplot(plotnine.aes(x='carat', y='price', fill='color'), data=diamonds)
g1=g0+plotnine.geom_point(shape=1) # Legend all blackprint(g1)
g2=g0+plotnine.geom_point(shape='s') # Legend correctly colorizedprint(g2)
I did try adding parameters 'color=fill' 'color=color' & fill='color' to try and get the legend colorized, but no luck