import bokeh.bokeh_magic %bokeh --notebook %bokeh --show import numpy as np from bokeh.plotting import scatter N = 100 x = np.linspace(0, 4*np.pi, N) y = np.sin(x) scatter(x, y, color="black",tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="sin(x)" ) scatter(x, 2*y, color="orange", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="2*sin(x)" ) # we will disable the `--show` mode to avoid the render of the last plot in the next code cell %bokeh --show-off %bokeh --hold scatter(x, y, color="black",tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="sin(x)" ) scatter(x, 2*y, color="orange", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="2*sin(x)" ) %bokeh --show scatter(x, 3*y, color="green", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="3*sin(x)" ) scatter(x, 4*y, color="blue", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="4*sin(x)" ) # we will disable the `--show` mode to avoid the render of the last plot in the next code cell %bokeh --show-off %bokeh --figure %bokeh --show scatter(x, y, color="black",tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="sin(x)" ) scatter(x, 2*y, color="orange", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="2*sin(x)" ) scatter(x, 3*y, color="green", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="3*sin(x)" ) scatter(x, 4*y, color="blue", tools="pan,wheel_zoom,box_zoom,reset,previewsave", legend="4*sin(x)" )