Pet*_*ang 28
如果您已经创建了图,那么您可以使用该bokeh.plotting.curplot()函数返回"当前"图,然后设置其height和width属性.如果Plot使用较低级别的接口构建对象(例如,中的示例bokeh/examples/glyph/,则可以直接在绘图对象或Plot()构造函数中设置这些属性.
或者,如果您正在使用任何字形生成函数bokeh.plotting,则可以传递plot_width和plot_height关键字参数,例如:
line(x,y, color="#0000FF", tools="pan,wheel_zoom,box_zoom,reset",
name="line_example", plot_width=800, plot_height=300)
Run Code Online (Sandbox Code Playgroud)
Pau*_*aul 11
您可以将plot_width/plot_height命令添加到figure命令本身.请注意,您还可以通过工具关键字var中的resize将调整大小工具添加到工具集中,这可能会有所帮助.
bokeh.plotting.figure(x_axis_type = "datetime",
tools="pan,wheel_zoom,box_zoom,reset,resize,previewsave",plot_width=1000,
name="myplot")
Run Code Online (Sandbox Code Playgroud)
很抱歉回答我自己的问题,这实际上很简单.
bokeh.plotting.curplot().plot_height=400
bokeh.plotting.curplot().plot_width=800
Run Code Online (Sandbox Code Playgroud)