gpt4 book ai didi

python - 在 Bokeh 图中隐藏图例

转载 作者:太空狗 更新时间:2023-10-30 00:54:17 25 4
gpt4 key购买 nike

LS, Bokeh 图会自动为图生成图例。如何隐藏(根本不显示) Bokeh 图中的图例?我试过:legend = 'none'。但没有成功。谢谢

最佳答案

如果我可以稍微扩展一下 - legend=False 是使 Bokeh 图例不可见的正确方法,但它用于情节本身的创建,而不是被称为绘图对象的属性。我的意思是,写

from bokeh.charts import Scatter
myPlot = Scatter(foo, bar, legend=False)

而不是

from bokeh.charts import Scatter
myPlot = Scatter(foo, bar)
myPlot.legend=False.

关于python - 在 Bokeh 图中隐藏图例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39141308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com