Python/bokeh: Difference between revisions

From Wiki
(Die Seite wurde neu angelegt: „<pre> from bokeh.plotting import figure, output_file, show, output_notebook data_x = [0,1,2,3,4] data_y = [-1,5,2,4,3] output_notebook() p = figure(title="S…“)
 
No edit summary
Line 1: Line 1:
== Simple example =
<pre>
<pre>
from bokeh.plotting import figure, output_file, show, output_notebook
from bokeh.plotting import figure, output_file, show, output_notebook
Line 7: Line 8:
output_notebook()
output_notebook()


p = figure(title="Scale drift over time", x_axis_label='time [s]', y_axis_label='weight [g]')
p = figure(title="Scale drift over time", x_axis_label='time [s]', y_axis_label='weight [g]', plot_width=1050)


p.line(data_x, data_y, legend="weight", line_width=1, line_color="red")
p.line(data_x, data_y, legend="weight", line_width=1, line_color="red")

Revision as of 21:41, 23 February 2018

= Simple example

from bokeh.plotting import figure, output_file, show, output_notebook

data_x = [0,1,2,3,4]
data_y = [-1,5,2,4,3]

output_notebook()

p = figure(title="Scale drift over time", x_axis_label='time [s]', y_axis_label='weight [g]', plot_width=1050)

p.line(data_x, data_y, legend="weight", line_width=1, line_color="red")

show(p)