In [4]:
from bokeh.io import output_notebook, show
output_notebook()
In [5]:
from bokeh.charts import Scatter, Bar
from bokeh.sampledata.autompg import autompg as df
from bokeh.models import Range1d
x_range = Range1d(20, 30)
In [6]:
range_in_call = Scatter(df, x='mpg', title="x='mpg'", xlabel="Miles Per Gallon", x_range=x_range, plot_height=200)
show(range_in_call)
Out[6]:
In [7]:
range_after = Scatter(df, x='mpg', title="x='mpg'", xlabel="Miles Per Gallon", plot_height=200)
range_after.x_range = x_range
show(range_after)
Out[7]:
In [9]:
bar_plot = Bar(df, label='cyl', title="label='cyl'", y_range=Range1d(100, 150))
show(bar_plot)
Out[9]:
In [10]:
bar_plot = Bar(df, label='cyl', title="label='cyl'")
bar_plot.y_range = Range1d(100, 150)
show(bar_plot)
Out[10]:
In [ ]: