Pygal – Dynamic SVG Charting Library

PYthon svg GrAph plotting Library (pygal) is a dynamic SVG charting statistical visualization library written in Python.


  • Wide range of chart types are supported:
    • Line – Basic, horizontal line, stacked, and time.
    • Bar – Basic, horizontal, and stacked.
    • Histogram – Basic.
    • XY – Basic, scatter plot, dates, date, time, and timedelta.
    • Pie – Basic, multi-series pie, donut, and half pie.
    • Radar – Basic (Kiviat diagram).
    • Box – Extremes, interquartile range, tukey, standard deviation, and population standard deviation.
    • Dot – Basic (punch card), and a chart supporting negative values.
    • Funnel – Basic.
    • SolidGauge – Normal and half.
    • Gauge – Basic.
    • Pyramid – Population pyramid.
    • Treemap – Basic.
    • Maps – there are three maps available, a world map, a map of France, and a map of Switzerland. For the world map, you can plot countries by specifying their code. With the French map, you can plot administrative divisions and regions. The Swiss map lets you plot cantons, territorial/administrative subdivisions of Switzerland.
  • Styles:
    • 14 Built-in styles – Default, DarkStyle, Neon, Dark Solarized, Light Solarized, Light, Clean, Red Blue, Dark Colorized, Light Colorized, Turquoise, Light green, Dark green, Dark green blue, and Blue.
    • 5 Parametric styles – Rotate, Lighten, Darken, Saturate, and Desaturate.
    • Custom styles – 2 different ways using either the Style class, or using a custom css.
  • HTML table export of given data.
  • Customize series – secondary, stroke, fill, show dots, show only major dots, dots size, stroke style, rounded bars, inner radius, allow interruptions, and formatter.
  • Built-in data transformers.
  • Export visualizations to PNG/SVG images, stand-alone HTML pages and the Online Vega-Lite Editor.
  • Serialize visualizations as JSON files.
  • Python API for building statistical visualizations in a declarative way.
  • Auto-generated internal Python API that guarantees visualizations are type-checked and in full conformance with the Vega-Lite specification.
  • Display visualizations in the live Jupyter Notebook, JupyterLab, nteract, on GitHub and nbviewer.
  • Auto-generate Altair Python code from a Vega-Lite JSON spec.
  • Public API is chainable and can be simplified as call arguments.
  • Available for Python 2.7 and 3.2, 3.3, 3.4, 3.5.

Developer: Kozea Group and contributors
License: GNU LGPL v3


pygal is written in Python. Learn Python with our recommended free books and free tutorials.

Return to Python Visualization Packages Home Page

Make a Donation
Click the button to make a donation via flattr. Donations help us to maintain and improve the site. You can also donate via PayPal.

Read our complete collection of recommended free and open source software. The collection covers all categories of software.

The software collection forms part of our series of informative articles for Linux enthusiasts. There's tons of in-depth reviews, alternatives to Google, fun things to try, hardware, free programming books and tutorials, and much more.
Share this article

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.