Famous Python Libraries for Data Visualization

By CoderzColumn

1. Matplotlib

Chart's Type: Static

  • Inspired by Matlab’s plotting functionality.
  • Very commonly used by researchers to create high-quality publication charts.
  • We can link charts to "ipywidgets" widgets (dropdown, checkbox, etc.) in Jupyter Notebook to add interactivity.
  • Supports animation.

2. Bokeh

Chart's Type: Interactive

  • Bokeh is a javascript-based library that let us create interactive charts in Jupyter Notebooks.
  • It supports addition of custom Javascript to support specialized cases.
  • Bokeh also provides various widgets and dashboarding functionalities.
  • It is good at handling streaming data.

3. Plotly

Chart's Type: Interactive

  • Supports a very vast majority of charts covering many different areas.
  • Its plotly express version let us create charts with few lines of code.
  • It also provides us with dashboarding functionality through "dash" library. Dash enterprise version supports creation of heavy AI/ML application dashboards.

4. Bqplot

Chart's Type: Interactive

  • Bqplot is 2D visualization system for Jupyter Notebooks. It is built on top of "d3.js" and "ipywidgets" by Bloomberg developers.
  • Individual components of chart are widgets internally.
  • Supports matplotlib-like API (Pyplot API) as well as grammar of Graphics-based API (Object Model API) to create a chart.

5. Plotnine

Chart's Type: Static

  • Library based on grammar of Graphics concept.
  • The grammar of graphics allows us to compose chart components (Axes, titles, etc) individually and combine them to create a chart.
  • Built on top of "Matplotlib".
  • Inspired by famous data visualization library "ggplot2" of R Programming.

6. Altair

Chart's Type: Interactive

  • Altair is an interactive data visualization library based on Vega and Vega-Lite (Declarative Languages specifying Grammar of Interactive Charts).
  • It supports many statistical visualizations.
  • Internally all visualizations are represented using Vega /Vega-lite JSON schema.

7. Chartify

Chart's Type: Interactive

  • Chartify is a small data visualization library built on the top of "Bokeh". It is developed by Spotify.
  • The main aim of library is to make charting easier so that more time can be spent on data analysis.
  • It has an intuitive API and a default style for charts.

8. Seaborn

Chart's Type: Static

  • Seaborn is a statistical data visualization library built on top of "matplotlib".
  • It let us better explore relationships between our data variables with few lines of code.
  • Stat visualizations like hist plot, box/violin plot, hex plot, KDE plot, heatmap, swarm plot, etc.

9. Holoviews

Chart's Type: Static & Interactive

  • Open-source visualization library from Anaconda.
  • Creates charts using either "matplotlib", "bokeh" or "plotly" as a backend.
  • We need to provide chart details with few lines of holoviews code and it’ll create a chart using the specified backend.
  • Let us specify chart details using Notebook magic commands.

10. Pandas Viz

Chart's Type: Static

  • Pandas is most preferred tool to maintain/manipulate structured data in Python.
  • It provides basic visualization functionality using "plot()" method of dataframe. We cap specify chart type using "kind" parameter.
  • Supports a few statistical charts through "plotting" sub-module.
  • Creates charts using "matplotlib" behind the scene.

11. Cufflinks

Chart's Type: Interactive

  • Cufflinks is another visualization library designed on top of "plotly".
  • Let us create charts from Pandas dataframe (using just one line of code) by calling "iplot()" or "figure()" method.
  • Works exactly like pandas "plot()" method but creates interactive charts.

12. Hvplot

Chart's Type: Interactive

  • Hvplot let us create interactive charts directly from pandas dataframe.
  • Designed on top of "holoviews" (uses "matplotlib", "bokeh" and "plotly" as backend).
  • We just need to import "hvplot.pandas" and all further calls to "plot()" method on dataframe will generate interactive charts.

13. Pandas-Bokeh

Chart's Type: Interactive

  • Pandas bokeh let us create interactive visualizations from pandas dataframe with just one line of code.
  • We need to set the plotting backend as "pandas_bokeh" first. Then, we can call "plot_bokeh()" method on the pandas dataframe to create charts.

Few Other Libraries

  • Pygal (Interactive Charts)
  • Toyplot (Interactive Charts)
  • Lets-plot (Interactive Charts)
  • Autoviz (Interactive Charts)
  • Proplot (Static Charts)
  • Biggles - Scientific Charts (Static Charts)
  • Chart (Static Charts)

Visit PyViz for a comprehensive list of Python data visualization libraries.

Feel free to visit CoderzColumn Data Science section to learn about these libraries through simple tutorials.