如何在 yhat 的 python ggplot 中禁用颜色条?
How to disable colorbar in yhat's python ggplot?
如何在像这样的情节中禁用颜色条:
ggplot(
aes(x='X',
y='Y',
color='C'),
data=data_df
) + geom_line() + facet_grid("U", "V")
问题是 C
的基数很大,情节的重点只是把各种形状放在一起看,而不是给它们贴上标签。
这不是直接的答案,但在检查 github 之后我认为它还没有实现。我建议您使用 plotnine
,它也是 mpl 的 ggplot 包装器 - 但仍在开发中。
例如:
from plotnine import *
from plotnine import data
(ggplot(data.mtcars, aes('wt', 'mpg', color='factor(gear)'))
+ geom_point(show_legend = False))
如何在像这样的情节中禁用颜色条:
ggplot(
aes(x='X',
y='Y',
color='C'),
data=data_df
) + geom_line() + facet_grid("U", "V")
问题是 C
的基数很大,情节的重点只是把各种形状放在一起看,而不是给它们贴上标签。
这不是直接的答案,但在检查 github 之后我认为它还没有实现。我建议您使用 plotnine
,它也是 mpl 的 ggplot 包装器 - 但仍在开发中。
例如:
from plotnine import *
from plotnine import data
(ggplot(data.mtcars, aes('wt', 'mpg', color='factor(gear)'))
+ geom_point(show_legend = False))