Getting Started

After the installation and learning about the basic concepts of Bokeh let’s create a simple plot.

Example:

Python3




# importing the modules 
from bokeh.plotting import figure, output_file, show 
  
# instantiating the figure object 
graph = figure(title = "Bokeh Line Graph"
  
# the points to be plotted 
x = [1, 2, 3, 4, 5
y = [5, 4, 3, 2, 1
  
# plotting the line graph 
graph.line(x, y) 
  
# displaying the model 
show(graph)


Output:

In the above example, we have created a simple Plot with the Title as Bokeh Line Graph. If you are using Jupyter then the output will be created in a new tab in the browser.

Python Bokeh tutorial – Interactive Data Visualization with Bokeh

Python Bokeh is a Data Visualization library that provides interactive charts and plots. Bokeh renders its plots using HTML and JavaScript that uses modern web browsers for presenting elegant, concise construction of novel graphics with high-level interactivity. 

Features of Bokeh:

  • Flexibility: Bokeh can be used for common plotting requirements and for custom and complex use-cases.
  • Productivity: Its interaction with other popular Pydata tools (such as Pandas and Jupyter notebook) is very easy.
  • Interactivity: It creates interactive plots that change with the user interaction.
  • Powerful: Generation of visualizations for specialized use-cases can be done by adding JavaScript.
  • Shareable: Visual data are shareable. They can also be rendered in Jupyter notebooks.
  • Open source: Bokeh is an open-source project.

This tutorial aims at providing insight to Bokeh using well-explained concepts and examples with the help of a huge dataset. So let’s dive deep into the Bokeh and learn all it from basic to advance.

Table Of Content
 

  • Installation
  • Bokeh Interfaces – Basic Concepts of Bokeh
  • Getting Started
  • Annotations and Legends 
    • Customizing Legends 
       
  • Plotting Different Types of Plots 
    • Bar Plot
    • Scatter Plot
    • Patch Plot
    • Area Plot
    • Pie Chart
  • Creating Different Shapes 
    • Circle
    • Oval
    • Triangle
    • Rectangle
    • Polygon
  • Plotting Multiple Plots 
    • Vertical Layouts
    • Horizontal Layout
    • Grid Layout
  • Interactive Data Visualization 
    • Configuring Plot Tools
    • Interactive Legends
    • Adding Widgets to the Plot
  • Creating Different Types of Glyphs
  • Visualizing Different Types of Data
  • More Topics on Bokeh

Similar Reads

Installation

Bokeh is supported by CPython 3.6 and older with both standard distribution and anaconda distribution. Bokeh package has the following dependencies....

Bokeh Interfaces – Basic Concepts of Bokeh

Bokeh is simple to use as it provides a simple interface to the data scientists who do not want to be distracted by its implementation and also provides a detailed interface to developers and software engineers who may want more control over the Bokeh to create more sophisticated features. To do this Bokeh follows the layered approach....

Getting Started

After the installation and learning about the basic concepts of Bokeh let’s create a simple plot....

Annotations and Legends

...

Plotting Different Types of Plots

Annotations are the supplemental information such as titles, legends, arrows, etc that can be added to the graphs. In the above example, we have already seen how to add the titles to the graph. In this section, we will see about the legends....

Creating Different Shapes

...

Plotting Multiple Plots

...

Interactive Data Visualization

Glyphs in Bokeh terminology means the basic building blocks of the Bokeh plots such as lines, rectangles, squares, etc. Bokeh plots are created using the bokeh.plotting interface which uses a default set of tools and styles....

Creating Different Types of Glyphs

...

Visualizing Different Types of Data

...

More Topics on Bokeh

...