如果我可以稍微扩展一下 - legend=False是使Bokeh图例不可见的正确方法,但它在绘图本身的创建中使用,而不是被称为绘图对象的属性.我的意思是,写
from bokeh.charts import Scatter
myPlot = Scatter(foo, bar, legend=False)
Run Code Online (Sandbox Code Playgroud)
而不是
from bokeh.charts import Scatter
myPlot = Scatter(foo, bar)
myPlot.legend=False.
Run Code Online (Sandbox Code Playgroud)