Vega-Altair
by Vega-Altair developers (Vega project) · Library · also known as Altair
Declarative Python visualization library that compiles concise chart specifications to Vega-Lite JSON for interactive, grammar-of-graphics plots
Overview
Vega-Altair is a declarative statistical visualization library for Python, released under BSD 3-Clause and maintained as part of the Vega project. A chart is built by mapping DataFrame columns to visual encodings (x, y, color, size, tooltip) on a mark type; Altair validates the specification against the Vega-Lite schema and emits JSON that the Vega-Lite runtime renders in Jupyter, marimo, VS Code, Streamlit or any web page. Layering, concatenation, faceting, selections and parameters compose into interactive dashboards with linked brushing, and the same specification can be saved as JSON, HTML, PNG, SVG or PDF through vl-convert. Because transformations (aggregation, binning, filtering) can be expressed in the spec, the browser does the work; the optional VegaFusion backend pushes them back to Python for large data.
Altair is a concise alternative to imperative plotting when charts follow the grammar-of-graphics pattern. It is less suitable for highly customized figure layouts, large datasets are limited by what the browser can hold without VegaFusion, and some styling requires knowledge of Vega-Lite's configuration model.
Capabilities
- Grammar-of-graphics encodings over pandas or Polars DataFrames
- Validated Vega-Lite JSON output
- Interactive selections, parameters and linked views
- Layering, concatenation and faceting
- Export to HTML, PNG, SVG and PDF via vl-convert
- VegaFusion for server-side transformations
Typical workflows
- Faceted comparisons across regions or symbols in a notebook
- Interactive exploratory charts with brushing
- Reproducible chart specs stored as JSON
Strengths
- Compact, readable chart code
- Specification is portable JSON
- BSD license
Limitations
- Browser-side rendering limits data size without VegaFusion
- Fine layout control is harder than matplotlib
- Requires understanding Vega-Lite for advanced styling
Prerequisites
- Python with pandas or Polars; vl-convert for static export
Who it is for
- Data scientists and analysts
- Instructors teaching visualization grammar
Alternatives & comparison
- D3
Modular JavaScript library for bespoke, data-driven web graphics: scales, axes, shapes, layouts, geo projections, transitions and DOM selections
Open sourceOpen source - Matplotlib
The foundational Python plotting library for static, publication-quality figures with full control over every element, exported to PDF, SVG, PNG and PGF
Open sourceOpen source - Observable
JavaScript data notebooks and the open-source Observable Framework static-site generator for data apps, from the maintainers of D3 and Plot
MixedFreemium - Plotly
MIT-licensed interactive charting libraries for Python (plotly.py), JavaScript (plotly.js) and R, plus the Dash framework for analytical web apps
MixedOpen source
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- LicenseAltair LICENSE (BSD 3-Clause)checked Nov 1, 2026
https://github.com/vega/altair/blob/main/LICENSE
Supports: license_spdx, source_model
- Official siteVega-Altair: Declarative Visualization in Pythonchecked Nov 1, 2026
https://altair-viz.github.io/
Supports: name, summary, capabilities
Site is also the documentation
- Repositorychecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Data visualization
Microsoft Power BI
Microsoft · BI & dashboards
Microsoft's business-intelligence suite: free Windows Power BI Desktop for modeling and reports, and the Power BI service in Microsoft Fabric for sharing
Tableau
Salesforce · BI & dashboards
Salesforce's visual analytics platform: Tableau Desktop authoring (now with a free edition), Tableau Cloud and Server for sharing, and Tableau Next for CRM analytics