import sys
sys.version_info
import numpy as np
print(np)
np.__version__
import bokeh
bokeh.__version__
from bokeh.io import output_notebook, show
output_notebook()
from bokeh.plotting import figure
import numpy as np
x = np.linspace(0, 4*np.pi, 100)
y = np.sin(x)
plot = figure(title="Sine Function")
plot.xaxis.axis_label='x'
plot.yaxis.axis_label='amplitude'
plot.line(x, y,
line_color='blue',
line_width=2,
legend='sin(x)')
plot.circle(x, 2*y,
fill_color='red',
line_color='black',
fill_alpha=0.2,
size=10,
legend='2sin(x)')
#line_dash is an aribrary length list of lengths
#alternating in [color, blank, color, ...]
plot.line(x, np.sin(2*x),
line_color='green',
line_dash=[10,5,2,5],
line_width=2,
legend='sin(2x)')
show(plot)
from bokeh.sampledata.iris import flowers
flowers.head()
from bokeh.charts import Scatter
plot = Scatter(flowers, x='petal_length', y='petal_width',
color='species',
legend='top_left', title='Flower Morphology')
show(plot)