Created
March 18, 2020 12:42
-
-
Save AntonioMarsella/1e1344336c594484603838609c9c002c to your computer and use it in GitHub Desktop.
passing numpy arrays to bokeh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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