简体   繁体   中英

How to disable colorbar in yhat's python ggplot?

How does one disable colorbar in a plot like so:

ggplot(
    aes(x='X',
        y='Y',
        color='C'),
    data=data_df
) + geom_line() + facet_grid("U", "V")

The problem is that C is of a large cardinality and the point of the plot is just to see the various shapes altogether and not to label them.

This is no direct answer, but after checking the github I don't think it is implemented yet. I would advise you to use plotnine , which is also a ggplot wrapper for mpl - but still under development.

Eg:

from plotnine import *
from plotnine import data
(ggplot(data.mtcars, aes('wt', 'mpg', color='factor(gear)'))
 + geom_point(show_legend = False))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM