Bokeh(Python)
Bokeh(Python)
Bokeh is a Python library which is used for data visualization through high-
performance interactive charts and plots. It creates its plots using HTML and
JavaScript languages. The output of the bokeh library can be generated on
several platforms such as browser, HTML, server, and notebook. It is also
possible to create the bokeh plots in Django and flask applications.
The bokeh library provides two visualization interfaces to the users:
How to create different types of data visualization graphs and charts using the
bokeh library in Python.
Installation:
We can create Scatter Circle Markers on the Plot by using the bokeh library. For
this, we will use the circle() function.
Example:
# creating figure
plot1 = fig(plot_width = 500, plot_height = 500, title = "Scatter Markers")
Output:
We can create a single line by using the bokeh library in Python. For this, we
will use the line() function.
Example:
# creating figure
plot1 = fig(plot_width = 500, plot_height = 500, title = "Scatter Markers")
Output:
To Create a Bar chart
Bar charts are used for representing the categorical data with rectangular bars.
The length of the bar is proportional to the values they are representing.
# x-coordinates to be plotted
x = [1, 2, 3, 4, 5, 6, 7, 8]
Output:
Horizontal Bar Chart
# x-coordinates to be plotted
x = [1, 2, 3, 4, 5, 6, 7, 8]
# y-coordinates of the top edges
right1 = [5, 1, 4, 3, 2, 7, 6, 8]
Output:
To Create Box Plot
Box plot is used for representing the statistical data on the plots, and it is helpful
for summarizing the statistical properties of several groups present in the
dataset.
Output: