Two weeks ago, we started a two-part post on the best tools for visualizing your results and ideas through Python. In the second part, we are completing what we started by introducing 5 extra tools you can leverage to master python visualization or extend your existing demonstration powerhouse.

  • Pygal


Pygal was specially designed for creating SVG graphics in Python. As many of you know, SVG stands for Scalable Vector Graphics, a special-purpose language for describing 2D graphical elements via text, to produce scalable and compact images useful for interactive plotting in modern web browsers. If you want to save your diagrams as PNG, you can still use Pygal with an additional tool for making PNG. Pandas code is short and simple. There is simply one method for each chart type and the default styles are pretty, so you won’t need to write lengthy code for customizing the appearances.

Pygal does not integrate with pandas as naturally as matplotlib-based solutions. Although it works well with smaller datasets, SVG processing gets somewhat slow when the data gets big, e.g. more than a few thousand records.



Web app: 

Plotly was initially designed as an online tool for doing analytics and visualization. While it still keeps its invaluable web app available in the form of an entirely separate package, from version 4.0 and above it has become “offline only”, meaning you do not need an API key or internet connection to use it, and everything is done locally. 

Plotly integrates with pandas perfectly. It puts a complete arsenal of interactive web-based plot types at your disposal: from simple bar plorts and heatmaps to the funnel_chart, timeline, treemap, sunburst, geographic maps, contour plots, dendograms, and 3D charts. Some of these charts are not supported by any other general-purpose plotting tool. This diverse chart package is one of the main advantages of plotly over its rivals.

  • Altair


Read more about VEGA:

In 2018, Brian Granger and Jake Vanderplas developed Altair as a “declarative statistical visualization library for Python.”  Like Pygal, it generates plots, not as bitmap images but specifies them in text, so that they later can be processed by all modern browsers. This design makes the resulting graphs are compact, web-friendly, interactive, and highly customizable.

Altair makes use of Vega-Lite, the more high-level version of Vega, which is a standard declarative format made for creating vizualizations. It describes your visualizations as JSON data structures and optionally can be used -along with the Ipyvega library- to embed your visualizations into Jupyter notebooks.

Altair deducts parts of the structure of the data it receives based on some reasonable assumptions. Thus, it allows the user to use her time making plots and diagrams, instead of searching for API’s.

  • Geoplotlib 

User Guide: 

Unlike all other libraries we talked about in this post and the last, Geoplotlib is special-purpose: It focused only on generating map-based visualizations. The reason it is listed among our suggestions is that very few general-purpose visualization libraries support map diagrams.

It is based on the fast and popular python graphics library Pyglet, which you must have installed to be able to use Geoplotlib. Through Geoplotlib, you can draw various map-type visualizations, including choropleths, heatmaps, and dot-density maps. 

  • Mpld3 


The mpld3 visualization library aggregates all the benefits of Matplotlib, the popular Python-based graphing library, and D3js, the popular JavaScript library for creating beautiful interactive visualizations for the web. The result is a simple API for exporting your matplotlib graphics to HTML code which can be used within the browser, within standard web pages, blogs, or tools such as the IPython notebook.