Learn Before
Concept
Plotting with Bokeh
The Python interactive visualization library Bokeh enables high-performance visual presentation of large datasets in modern web browsers.
Bokeh’s mid-level general purpose bokeh.plotting interface is centered around two main components: data and glyphs.
The basic steps to creating plots with the bokeh.plotting interface are:
- Prepare some data:
Python lists, NumPy arrays, Pandas DataFrames and other sequences of values
-
Create a new plot
-
Add renderers for your data, with visual customizations
-
Specify where to generate the output
-
Show or save the results
from bokeh.plotting import figure from bokeh.io import output_file, show x = [1, 2, 3, 4, 5] y = [6, 7, 2, 4, 5] p = figure(title="simple line example", p.line(x, y, legend="Temp.", line_width=2) x_axis_label='x', y_axis_label='y') output_file("lines.html") show(p)

0
1
Updated 2021-07-06
Tags
Python Programming Language
Data Science