Website profiles · Technology insights · Alternatives

pygal.org

No paid content found
Visit website
Profile views 2 Outbound visits 1 Normal
Pygal Full homepage screenshot

At a glance

Category
Development
Language
English
Paid-content signal
No paid content foundObserved
Registered
2012
Hosting
CloudflareInferred
HTTPS certificate trusted
PassedObserved
Last updated

Website review

This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.

What is Pygal?

Pygal is a Python charting library for building charts in code and rendering them as images, most commonly as SVG. Its pitch is brevity: the documentation's own example creates a bar chart with labels and values in a single chained expression, then calls render() to produce the output.

What it is good at

  • Vector output by default. SVG charts stay sharp at any size and are easy to embed in web pages or reports. SVG is also text, so you can style or post-process it.
  • Terse, declarative code. You describe the chart type and pass data; Pygal handles axes, legends and layout. That suits scripts where a chart is one step in a longer pipeline.
  • A broad chart vocabulary. Bar and line charts are the entry point, but the library also covers pie, radar, box, funnel, gauge, maps and more, so you can often avoid pulling in a second tool.
  • Python-native data flow. Data comes from lists, database queries or computed results without an intermediate file format.

Where it fits, and where it does not

Reach for Pygal when you want a chart file produced by a Python program: scheduled reports, documentation builds, static site generation, notebooks, or a small web app that serves pre-rendered images. It is a poor fit for interactive dashboards with hover tooltips, zooming and live data streaming; those needs point to browser-side libraries instead. If you need pixel-perfect publication styling or statistical chart types like facets and regression layers, a heavier plotting library will be less friction.

A concrete scenario

Suppose you run a nightly job that summarises signups per region. With Pygal you can build a bar chart from a dictionary of region totals, write the SVG to disk, and reference it from an HTML email or report page — no JavaScript, no headless browser, no extra service. If the same report later needs interactive filtering, that is the signal to switch tools rather than extend this one.

Deciding between Pygal and alternatives

Need Pygal's fit
Static SVG/PNG chart from a script Strong
Many chart types with minimal code Strong
Interactive, zoomable dashboards Weak
Statistical or faceted exploratory plots Weak

Next step

Start from the documentation's minimal example: create a chart object, pass your series, and call render() to see the SVG. Then check the chart-type list for the shape closest to your data before writing layout code. The project is documented at Pygal, and if you want a broader plotting toolkit for comparison, Matplotlib and Plotly cover the heavier and interactive ends of the spectrum respectively.

How do I create my first chart with Pygal?

Create a Bar chart, add one or more data series, and call render(). Pygal's own documentation shows the minimal pattern: instantiate pygal.Bar(), add values with .add(), then render.

import pygal

chart = pygal.Bar()
chart.add('Series 1', [1, 3, 3, 7])
chart.add('Series 2', [1, 6, 6, 4])
chart.render()

What each step does

  • pygal.Bar() chooses the chart type. Swapping in Line, Pie, or XY changes the visual without changing the workflow.
  • .add(label, values) appends one series. Call it again for each additional series; the label becomes the legend entry.
  • .render() produces the chart output. In the documentation example this returns an SVG string, which is what makes Pygal convenient for embedding charts in web pages or saving them to files.

A concrete first run

If you are building a small dashboard, start with a bar chart of weekly counts:

import pygal

chart = pygal.Bar(title='Signups per week')
chart.x_labels = ['W1', 'W2', 'W3', 'W4']
chart.add('2025', [12, 19, 14, 22])
chart.add('2026', [15, 24, 18, 27])
chart.render_to_file('signups.svg')

Setting x_labels makes the bars readable, and render_to_file() writes the result directly rather than returning a string you have to handle yourself.

Choosing between output methods

Method Use when
render() You need the markup in memory, e.g. to return it from a web framework
render_to_file() You want a saved .svg or .png file on disk
render_to_png() You need a raster image, typically with the CairoSVG dependency installed

Practical notes

Pygal's output is SVG by default, so it stays sharp at any size and is easy to style with CSS — a good fit for reports and web pages. PNG rendering depends on extra libraries, so treat it as a separate setup step rather than assuming it works out of the box. For interactive charts, Pygal also offers tooltips and hover behavior, but keep your first chart simple: get one series rendering before adding labels, titles, or multiple series.

Next step: after your first bar chart renders, change pygal.Bar() to pygal.Line() and reuse the same data to see how little the code changes.

How can I export a Pygal chart to PNG or SVG for use in a report or web page?

Pygal renders charts to SVG in the browser and can produce PNG through an image-rendering step, so it fits reports and web pages that want vector graphics by default. The page shows the basic pattern: build a chart object such as pygal.Bar(), pass data, then call .render().

SVG for reports and web pages

SVG is Pygal's native output and the better choice when the chart will be embedded in HTML or a PDF report, because it stays sharp at any size and remains editable as text.

import pygal

chart = pygal.Bar()
chart.add('Series A', [1, 3, 3, 7])
chart.add('Series B', [1, 6, 6, 4])

# Write SVG to a file
with open('chart.svg', 'w') as f:
    f.write(chart.render())

# Or get the SVG as a string for direct embedding
svg_data = chart.render(is_unicode=True)

For a web page, save the SVG and reference it with an <img> tag, or paste the SVG markup inline so the chart can inherit page styles and respond to CSS.

PNG for print and email

PNG is a raster format, so it suits contexts that cannot handle SVG, such as some email clients, Word documents, or slide decks. Pygal itself produces SVG, so a PNG export requires converting that SVG with an external tool. Common approaches:

  • cairosvg converts an SVG string or file to PNG in Python.
  • Inkscape or rsvg-convert convert on the command line in a build step.
  • A browser or headless renderer can screenshot the SVG if you already render charts in an HTML page.
import cairosvg

svg_data = chart.render(is_unicode=True)
cairosvg.svg2png(bytestring=svg_data.encode('utf-8'), write_to='chart.png')

Decide by destination: SVG for HTML, PDF, and anything that may be resized; PNG for fixed-size print, email, and tools without SVG support. If you need PNG, plan the conversion step into your script rather than treating it as part of Pygal itself.

For broader charting comparisons, see Matplotlib and Plotly.

What steps are involved in installing Pygal and setting it up in a Python project?

Pygal installs like most pure-Python libraries: you add it to an environment with pip, import it, and build charts by chaining a chart type and a render() call. The documentation's own front page shows the minimal shape of a working script — a Bar chart, data series passed as iterables, and a final render() — so setup is mostly about getting the package into the right environment and choosing where the output goes.

Install into the environment you actually run

  • Create and activate a virtual environment first, then run pip install pygal. This keeps Pygal and its dependencies out of your system Python and reproducible for teammates.
  • If you manage dependencies declaratively, add pygal to your requirements.txt or project file rather than installing ad hoc, so a fresh checkout can rebuild the same environment.
  • Confirm the install by importing it in a Python shell before writing chart code; an import error at this stage is far cheaper to debug than one buried in an application.

Verify with the smallest possible chart

The documentation's example is deliberately terse: instantiate a chart type, pass one or more data series, and call render(). A practical first check is to render a bar chart to a standalone SVG file and open it in a browser. If the file appears with the expected bars, your environment, import path and output handling are all working.

Decide the output format early

This is the setup decision that most affects the rest of your code:

Output route Typical use Trade-off
Render to a file (for example SVG) Reports, docs, static exports Easy to inspect; not interactive
Render to a string or bytes value Embedding in a web response or template Needs correct content type and encoding downstream
Interactive/browser-oriented rendering Dashboards where users hover for values More moving parts in the serving layer

Check the current API index in the Pygal documentation for the exact render methods and chart classes available in your installed version, since method names and options vary between releases.

A concrete starting scenario

Suppose you are adding a weekly-metrics panel to an internal Flask or Django app. Install Pygal in the app's virtual environment, write a small function that takes your query results and returns a rendered chart, then serve that output from a dedicated view. Keeping chart construction in one function means you can swap output formats later without touching your data layer.

Decision criteria for going further

  • Need static images for email or PDFs: file-based rendering is the simplest fit.
  • Need hover tooltips and legends in a browser: plan for the interactive rendering path from the start.
  • Need several chart types: check the API index first, because available chart classes differ across versions.
  • Working in a team: pin the Pygal version alongside your other dependencies so rendered output stays consistent.

How can I contribute to the Pygal project or report a bug?

Contribution to Pygal starts at its documentation site, which lists dedicated pages for Contributing, Installing, the Changelog and an API Index alongside the main docs. Those are the entry points to read before you touch code: the installation page tells you how to get a working local copy, and the changelog shows what has recently changed so you don't duplicate or contradict existing work.

For a bug, the practical route is to reproduce it against a current install, then check the changelog and issue tracker before filing. A useful report includes the Pygal version, the Python version, the exact chart call (for example a pygal.Bar() with its add() values), the renderer used, the full traceback, and the smallest snippet that still shows the problem. That last item matters more than prose: a maintainer can run a short snippet immediately, whereas a description of a chart that "looks wrong" usually needs a round of questions first.

Where different contributions fit

Contribution Best starting point What to prepare
Bug report Contributing page, then the project's issue tracker Version, minimal snippet, traceback, expected vs. actual output
Documentation fix Documentation index and the page in question The corrected wording or example, plus why it is clearer
Code patch Installing and Contributing pages A local checkout, a focused change, and a test that fails before and passes after
Feature idea Changelog and API Index Check it isn't already planned or implemented under a different name

If you are unsure whether something is a bug or expected behaviour, open it as a question with your snippet rather than a bug claim. That is faster to resolve and avoids closing a report that was really a usage question.

As a concrete next step: install Pygal in a virtual environment, run the smallest chart that reproduces your issue, and paste that snippet with your version numbers into the project's tracker. The official documentation at Pygal is the authoritative place to confirm current contribution guidance before you submit.

What changes and new features are included in the latest Pygal release?

The Pygal documentation's own front page does not contain a release-notes section, so the authoritative place to look for changes in the latest version is the project's Changelog page, which the documentation index lists alongside Documentation, Installing, Contributing, and the API Index. In other words, the package's current version is stated as Pygal 3.0.5 in the documentation title, but the specific feature and fix list for that release lives in the changelog rather than in the landing page.

Where to check, and what to expect there

  • Changelog — the primary source for added features, behavior changes, deprecations, and bug fixes per release.
  • Installing — useful if a release note mentions a changed dependency or a new Python version requirement.
  • API Index / Module Index — the fastest way to confirm whether a method, chart type, or option referenced in a changelog entry actually exists in the version you have installed.
  • Pygal — the documentation home that links to all of the above.

A practical way to read a changelog for this kind of library

Pygal is a Python charting library, and its landing page demonstrates the characteristic style with a compact example: a Bar() chart taking series such as (1, 3, 3, 7) and (1, 6, 6, 4), followed by .render(). That matters for interpreting release notes, because changes in a charting library usually fall into a few recognizable buckets:

Change type What it looks like in practice Who cares most
New chart type or option An added class or keyword argument you can pass to a chart People building new dashboards
Rendering or output changes Different SVG/PNG output, or changed .render() behavior Anyone with snapshot tests or embedded images
API or naming changes Renamed methods or arguments Existing codebases upgrading
Dependency and compatibility updates New minimum Python or library versions Teams pinning versions in CI

For a reader maintaining a reporting script, the decision rule is simple: if the changelog lists only additions, upgrading is usually low-risk and you can adopt the new feature at leisure. If it lists renames, removals, or output changes, test one representative chart end-to-end — build it, render it, and compare the file against your current output — before rolling the upgrade across a codebase.

Related questions

More questions →
What Types of Charts Can You Create with Pygal?

Pygal is a Python charting library that renders charts as SVG, and its chart types are exposed as classes you instantiate directly — for example pygal.Bar() for bar charts. The documentation's own front-page example shows this pattern: pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render(). So the practical answer to "what charts can I make?" is "whichever chart class Pygal exposes," and the authoritative list lives in the API Index and Module Index linked from the documentation.

How chart types are organized

Every chart type is a class on the pygal module. You create a chart by calling the class, pass data to it, and call .render() to get SVG output. The documentation's Index points to an API Index and a Module Index, which are the pages that enumerate the available classes and their parameters — that is where you confirm the full, current list rather than relying on a partial summary.

The front-page snippet is the minimal working shape:

import pygal

chart = pygal.Bar()
chart.add('Series 1', [1, 3, 3, 7])
chart.add('Series 2', [1, 6, 6, 4])
svg = chart.render()

The same structure applies to any other chart class: swap Bar for the class you want.

Chart types described in the documentation

The documentation's own description is deliberately broad — it advertises "Beautiful python charting" and "Simple python charting" rather than listing every class on the landing page. The specific chart types are documented in the API Index and Module Index, which the Index section links to alongside Documentation, Installing, Contributing, Changelog, and Search.

Because the landing page does not enumerate chart classes, treat the API Index as the source of truth for which types exist in your installed version. Pygal has historically covered common families such as bar, line, pie, and radar charts, but the exact set and their parameters should be read from the API Index for the version you have.

Customization options

Charts are customizable through options such as titles, labels, and styles. These are set on the chart object rather than passed as positional arguments, so the workflow is: instantiate the class, configure options, add data series, then render. The API Index lists the parameters available for each chart type, which is where you check whether a given option applies to the chart you chose.

Practical way to confirm what you can build

  1. Open the documentation and go to the API Index or Module Index.
  2. Find the chart classes listed there — each one is a chart type you can instantiate.
  3. Check the parameters for the class you want to confirm its customization options.
  4. Instantiate the class, add your data, and call .render() to produce SVG.

If a chart type you expect is missing, the Changelog page linked from the Index is the place to check whether it was added, renamed, or removed in a version change.

What Is Pygal? A Python Charting Library for SVG Charts

Pygal is a Python charting library for building charts programmatically with minimal code. You use it when you want to turn data into a chart inside a Python script or application, and you want the output to be a scalable SVG rather than a raster image. The library is documented at pygal.org and is maintained by Kozea as an open-source project.

What Pygal does

Pygal's stated purpose is "beautiful python charting" and "simple python charting." The core workflow is small: pick a chart type, feed it data, and render.

The documentation's own example shows the pattern:

pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render()

Read that in three steps:

  1. pygal.Bar() creates a bar chart object.
  2. Each call with values adds a data series — here two series, (1, 3, 3, 7) and (1, 6, 6, 4).
  3. .render() produces the chart output.

The input is your numeric data; the action is choosing a chart type and adding series; the expected result is a rendered chart you can embed or save.

Why SVG matters

Pygal renders charts as SVG (Scalable Vector Graphics). That has practical consequences:

  • Scalable — SVG is vector-based, so it stays sharp when resized, unlike a fixed-resolution PNG.
  • Web-friendly — SVG is a standard browser format, so charts can be placed directly in web pages.
  • Text-based — SVG is markup, so it can be styled, embedded, and manipulated like other web content.

If you need a raster image for print or a specific pipeline, that is a different requirement than what Pygal is built around.

When Pygal is a good fit

Your situation Pygal fits?
You want charts generated from Python with little code Yes — the API is deliberately terse
You need scalable, web-embeddable output Yes — SVG is the native output
You want an open-source library Yes — it is a Kozea project
You need a chart type or output format not covered by the library Check the API index in the docs first

Where to go next

The pygal.org documentation is organized into these sections:

  • Documentation — the main usage guide
  • Installing — how to get Pygal set up
  • Contributing — how to take part in the project
  • Changelog — what changed between versions
  • API Index and Module Index — reference material for specific classes and functions

The documentation shown is for Pygal 3.0.5. Start with the Documentation overview, then use the API Index when you need details on a specific chart type or method.

How Pygal Renders Charts and What Output Formats Are Available

Pygal renders charts as SVG (Scalable Vector Graphics). You build a chart object, add data, then call render() to get the SVG markup as a string, or render_to_file() to write it to disk. This makes Pygal a good fit when you want resolution-independent, text-based chart output for the web or print rather than a raster image like PNG.

The rendering model

Pygal separates what you chart from how it is serialized:

  1. Instantiate a chart type — for example pygal.Bar().
  2. Add data — pass values to the chart, optionally with a title and labels.
  3. Render — call a render method to produce the output.

The documentation's own example shows the minimal path:

pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render()

Here the chart is created, two data series are added by calling the chart object, and render() returns the SVG. The chained style works because the chart instance is callable for adding series.

Output formats

Method What it returns / does Typical use
render() The chart as an SVG string Embedding in HTML, templates, or further processing
render_to_file() Writes the SVG to a file path you specify Saving a standalone .svg file

Both operate on the same chart object, so switching between "give me the markup" and "write it out" is a one-line change.

Why SVG is the default

SVG is vector-based, so the same chart stays sharp at any size — it scales cleanly in a browser, in a PDF, or in print. Because it is XML text, you can also style it with CSS, inspect it in a text editor, and diff it in version control. That is a different trade-off from raster formats, which are fixed-resolution and larger for equivalent quality.

Other formats

The core documented output is SVG. If you need a raster format such as PNG, that is not part of the basic render() path described in the documentation — treat any additional format as something to confirm against the project's current docs and extensions rather than assuming it is built in.

What to check before you commit

  • Do you need vectors? If the chart goes into a web page, a report, or print, SVG is usually the right answer and Pygal gives it to you directly.
  • Do you need a bitmap? If a downstream system only accepts PNG/JPEG, verify the conversion path first; you may need to rasterize the SVG yourself.
  • Where does the output go? Use render() when another layer (a template engine, an API response) will handle the string; use render_to_file() when you just want a file on disk.

For installation and first-run setup, see the project's Documentation and Installing pages; for the full set of chart types and options, the API Index is the reference to work from.

How to Install and Get Started with Pygal

Pygal is a Python charting library that produces SVG charts, and the documented way to get running is short: install the package, create a chart object, pass in your data, and call render(). The official documentation (pygal 3.0.5) shows the whole pattern in one line — pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render() — which tells you the library is designed so that a usable chart needs no configuration beyond your data.

Installing Pygal

The documentation lists Installing as a top-level section alongside Documentation, Contributing, Changelog, and API. The standard Python package workflow applies:

pip install pygal

If you work in an isolated environment, install it inside a virtual environment so the dependency stays scoped to that project. The docs also maintain a Contributing page, which is where you'd look if you want to install from source rather than from a package index.

Your First Chart

The documented example is the clearest starting point:

import pygal

pygal.Bar()(1, 3, 3, 7)(1, 6, 6, 4).render()

Reading it left to right:

  1. pygal.Bar() creates an empty bar chart object.
  2. The first call, (1, 3, 3, 7), adds one data series.
  3. The second call, (1, 6, 6, 4), adds a second series.
  4. .render() returns the chart as an SVG string.

Two things are worth noting about this API. First, calling the chart object is how you add data — there is no separate add() step in the documented example. Second, render() returns a string, so you decide what to do with it: write it to a .svg file, embed it in an HTML page, or return it from a web view.

Choosing a Chart Type

Pygal exposes chart types as classes. The documentation's own example uses Bar, and the API Index and Module Index list the rest. The pattern is identical across types — swap the class name and keep the same call-and-render flow:

import pygal

chart = pygal.Line()
chart.add('Series A', [1, 3, 3, 7])
chart.add('Series B', [1, 6, 6, 4])
chart.render()

Both the chained form and the explicit add() form work; use whichever reads more clearly in your code.

Where to Go Next

The documentation is organized into these sections:

Section What it covers
Documentation Overview and usage guidance
Installing Getting the package onto your system
Contributing Working on Pygal itself
Changelog Version history
API Index / Module Index Reference for classes and methods

Start with Documentation for usage patterns, and keep API Index open when you need the exact signature of a chart type or option. Pygal is a Kozea project, and the docs are built with Sphinx.

Common Sticking Points

  • Nothing renders to a file automatically. render() gives you a string; saving or serving it is your job.
  • Data goes in as sequences. The documented example passes plain tuples, so lists and other sequences follow the same path.
  • Check your chart type exists. If a class name isn't in the API Index, it isn't part of the documented surface.
  • Version matters. The documentation covers pygal 3.0.5; behavior described there may differ from older releases, so confirm your installed version if something doesn't match.

Website Overview

An established domain and managed infrastructure suggest continuity of operations and may support dependable delivery, although neither guarantees service quality. Several search or sharing settings need attention. Together they may make snippets, preview images or preferred URLs less consistent across platforms.

Domain and Registration

Registered in 2012, this domain has about 14 years of history. That suggests continuity, although ownership and purpose may have changed. Transfer-protection status is present, helping reduce the risk of unauthorized domain transfers. The domain uses the common .org extension, which is not an independent safety signal.

DNS and Email

Nameservers are provided by ovh.net, indicating managed DNS hosting. No MX record was found. A conventional explicit inbound-mail route is not configured. DNSSEC signatures were not detected, so this additional DNS authenticity protection is not confirmed. The lowest observed DNS TTL is 300 seconds. No CAA record was found; there is no additional DNS-based restriction on certificate issuers.

TLS and Certificates

The public key uses EC with 256 bits. The server supplied a complete certificate chain. No organization name is present in the certificate; the available fields are consistent with domain validation. The certificate was issued within the Google Trust Services cloud or CDN ecosystem. The certificate's total validity is about 90 days, consistent with a short renewal cycle.

HTTP and Browser Security

The response lacks these common security headers: HSTS, CSP, Permissions-Policy, clickjacking protection. CORS permits any origin to read this response. This is common for public resources; sensitive responses need narrower handling. No X-Powered-By header was found, reducing one common source of backend fingerprinting information. The cf-ray response header indicates a CDN or caching proxy in the delivery path. No obvious internal addresses or debug information were found in the headers.

Technology Stack Analysis

The public page identifies Cloudflare without precise versions, leaving fewer clues for version-specific scanning.

Search and Social Sharing

No homepage meta description was detected, leaving snippet selection more dependent on page text. No homepage canonical URL was detected. If duplicate URLs exist, consolidation may be less explicit. No Open Graph metadata was detected, so social previews may depend on platform inference. The title has 33 characters, within a common display range. The observed directives allow indexing and link following.

Hosting and Email

DNSovh.net
HostingCloudflare
EmailUnknown
Approximate IP geolocation (inferred; a CDN or proxy may differ from the origin server) United States flagUnited States Inferred 2606:4700::6810:fd78

Registration details

RDAP / WHOIS

RegistrarOVH sas
Registered2012-03-13
Expires2027-03-13
Domain statusclient delete prohibited、client transfer prohibited
Nameserversdns100.ovh.net、ns100.ovh.net
DNSSECunsigned

DNS records

DNS

TypeNameValueTTLPriority
Areadthedocs.io104.16.253.120300—
Areadthedocs.io104.16.254.120300—
AAAAreadthedocs.io2606:4700::6810:fd78300—
AAAAreadthedocs.io2606:4700::6810:fe78300—
NSpygal.orgdns100.ovh.net86400—
NSpygal.orgns100.ovh.net86400—
CNAMEwww.pygal.orgreadthedocs.io86400—

TLS and certificates

TLS / SSL

AssessmentNormal configuration
Supported protocolsTLSv1.2、TLSv1.3
Negotiated protocolTLSv1.3
Certificate subjectwww.pygal.org
IssuerGoogle Trust Services
Valid until2026-12-01T22:06 · Remaining when checked: 46 days
Verification detailsCertificate trust: Passed · Hostname match: Passed

HTTP response headers

HTTP

HeaderValue
content-typetext/html; charset=utf-8
cache-controlmax-age=1800, stale-if-error=86400, public
servercloudflare
x-content-type-optionsnosniff
referrer-policyno-referrer-when-downgrade
access-control-allow-origin*

Identified technologies

Cloudflare

Pages, Search and Sharing

Meta descriptionNot detected
Canonical URLNot detected
LanguageEnglish (default)
Twitter CardNot detected

Unknown

All bots 0 allowed · 0 disallowed

User reviews (0)

  • No reviews yet.