Skip to content

Instantly share code, notes, and snippets.

@AntonioMarsella
Created March 18, 2020 12:42
Show Gist options
  • Save AntonioMarsella/1e1344336c594484603838609c9c002c to your computer and use it in GitHub Desktop.
Save AntonioMarsella/1e1344336c594484603838609c9c002c to your computer and use it in GitHub Desktop.
passing numpy arrays to bokeh
from bokeh.io import output_file, show
from bokeh.plotting import figure
import numpy as np
x = np.linspace(0, 100, 1000) #one number every 100 till 1000
y = np.sin(x) + np.random.random(1000) * 0.2 #random noise added to sinusoid
plot = figure()
plot.line(x,y)
output_file('numpy.html')
show(plot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment