If you've already created the plot, then you can use the bokeh.plotting.curplot()
function to return the "current" plot, and then set its height
and width
attributes. If you are building up a Plot
object using the lower-level interfaces (e.g. the examples in bokeh/examples/glyph/
, then you can just set those attributes directly as well on the plot object or in the Plot()
constructor.
Alternatively, if you are using any of the glyph generation functions in bokeh.plotting
, you can pass the plot_width
and plot_height
keyword arguments, e.g.:
line(x,y, color="#0000FF", tools="pan,wheel_zoom,box_zoom,reset",
name="line_example", plot_width=800, plot_height=300)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…