Data Visualization

plotnine – grammar of graphics for statistical plots

plotnine is a statistical visualisation library based on the grammar of graphics, an approach popularised by ggplot2. It allows users to construct plots by combining data, graphical elements, scales, statistical transformations and presentation settings.

Rather than selecting a chart type and treating it as a fixed object, plotnine encourages plots to be assembled from independent components. A scatter plot can gain a fitted trend line, a statistical summary or another graphical layer without requiring a different plotting interface.

This compositional approach is particularly useful for exploratory analysis, reproducible research and statistical reporting. The library works with structured datasets and provides tools for mapping variables to graphical properties, comparing subsets of observations and controlling the appearance of the resulting figures.

This is free and open source software.

Key Features

  • Grammar-of-graphics interface inspired by ggplot2.
  • Construct plots by combining data mappings, graphical layers and presentation components.
  • Create scatter, line, bar, area, histogram, density and box plots.
  • Map dataset variables to position, colour, fill, size, shape and other aesthetics.
  • Use statistical transformations for smoothing, binning, aggregation and distribution estimation.
  • Apply faceting to divide observations into multiple panels.
  • Control continuous, discrete and transformed scales.
  • Customise coordinates, including flipped and other supported coordinate systems.
  • Combine multiple graphical layers within a single plot.
  • Add statistical summaries, fitted trends and reference lines.
  • Customise axes, labels, guides and legends.
  • Use themes to control typography, backgrounds, grid lines and other visual elements.
  • Support common structured data workflows using pandas DataFrames.
  • Define reusable plotting components for consistent graphics.
  • Export figures to supported image and document formats.
  • Use named colour palettes and configurable colour scales.

Website: github.com/has2k1/plotnine
Support:
Developer: Hassan Kibirige
License: GNU General Public License v2.0

plotnine

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


Related Software

Python Visualization Packages
matplotlibPython 2D plotting library which produces publication quality figures
DiagramsDraw the cloud system architecture in Python code
BokehElegant, concise construction of versatile graphics
DashPython framework for building analytical web applications
seabornPython visualization library based on matplotlib
PlotlyInteractive, browser-based graphing library for Python
VisPyVisualize massive datasets in real time
Vega-AltairDeclarative Visualization in Python
plotnineGrammar of graphics for Python
PyQtGraphPython graphics and GUI library built on PyQt4 / PySide and numpy
bqplotInteractive Plotting Framework for the Jupyter Notebook
VaexFast visualization of big data
PyVista3D plotting and mesh analysis
foliumVisualize data in a Leaflet map
HoloViewsMake Data Analysis and Visualization Seamless
DatashaderGenerates aggregate arrays and representations of them as images
ytMulti-code Toolkit for Analyzing and Visualizing Volumetric Data
GlumpyIntuitive interface between NumPy and modern OpenGL
GeoViewsExplore and visualize geographical, meteorological, and oceanographic datasets
PygalDynamic SVG charting library
GlueMulti-dimensional linked-data exploration

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted