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