gleplot
gleplot writes standard GLE (Graphics Layout Engine) scripts from Python, through matplotlib's names where they map cleanly. GLE compiles the script to publication-quality PDF, EPS, SVG, PNG or JPG.
The code that draws it (the gallery's Combined X+Y Error Bars example):
import numpy as np
import gleplot as glp
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
y = np.array([1.8, 4.2, 9.1, 16.3, 24.8])
xerr = np.array([0.15, 0.20, 0.10, 0.25, 0.18])
yerr = np.array([0.3, 0.5, 0.6, 0.8, 1.0])
fig = glp.figure(figsize=(8, 6))
ax = fig.add_subplot(111)
ax.errorbar(x, y, yerr=yerr, xerr=xerr, fmt="o", color="blue", capsize=4,
label="Measured")
x_fit = np.linspace(0.5, 5.5, 100)
ax.plot(x_fit, x_fit**2, color="red", linestyle="--", label="y = x²")
ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_title("Combined X and Y Error Bars")
ax.legend()
fig.savefig("fit.gle") # the GLE script and its data files; GLE not needed
fig.savefig("fit.pdf") # compiled by GLE
Why gleplot
- The output is a script you can read and edit.
fit.gleis a short plain-text GLE file, with the data in.datfiles beside it. Change a label or a colour by hand, and GLE compiles it to vector PDF, EPS or SVG, or to PNG or JPG. - Scripts open again.
glp.open_gle("fit.gle")reads a.glefile back into aFigureyou can change from Python and save. - Unrecognised GLE is kept. When you open a hand-written file, GLE that gleplot does not model is written back in place on save rather than dropped, and each place it had to keep raw GLE or guess is recorded as a note (opening GLE files).
- GLE is optional for writing. Saving
.gleworks without GLE installed; you need GLE only to compile.
Install
gleplot needs Python 3.9 or later and numpy. Install it from PyPI:
pip install gleplot
For the latest development version, install from GitHub with pip install git+https://github.com/BenHuddart/gleplot.git.
To compile figures, install GLE 4.3+ from the GLE releases and check it with gle -info. GLE's include library (gleinc) is required too; the release packages ship it, and GLE's include library covers a GLE built from source. The getting started guide covers Ghostscript, LaTeX and gle -finddeps.
To work on gleplot itself, use an editable install with the development tools, as described in CONTRIBUTING.md:
git clone https://github.com/BenHuddart/gleplot.git
cd gleplot
pip install -e ".[dev]"
What it can plot
- Lines, scatter, bars, steps, stems and histograms (plot types)
- Error bars, symmetric or asymmetric, in x and y
- Fills between curves
- Heatmaps and contours with colour bars
- Subplots and shared axes
- Log scales, secondary axes and polar plots
- Reference lines and shaded spans, text and arrows
- Series read from existing data files
The gallery shows every example with its code.
Coming from matplotlib
figure, subplots, plot, scatter, errorbar, savefig and the other matplotlib names take matplotlib's arguments. Where GLE cannot do what a keyword asks, gleplot accepts it and warns; the matplotlib migration guide lists each difference. gleplot does not emulate what GLE cannot draw, so there is no pie chart, box plot or broken axis.
Upgrading from gleplot 5
gleplot 6 removes those features, raises on a bad argument when the call is made, and draws with matplotlib's colour cycle and bars without an outline. Migrating from gleplot 5 to 6 lists each change and what to use instead.
Documentation
The documentation site has the user guides and the API reference.
Contributing
See CONTRIBUTING.md. Questions and feature requests go to GitHub issues.
License
gleplot is licensed under the GPL-2.0 or later.
Metadata
Release files for gleplot 6.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gleplot-6.1.0.tar.gz | 545.6 kB | With provenance | Details for gleplot-6.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gleplot-6.1.0-py3-none-any.whl | Python 3 | none | any | Details for gleplot-6.1.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / gleplot-6.1.0.tar.gz
| Download URL | gleplot-6.1.0.tar.gz |
|---|---|
| Size | 545.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0561d7a2aa19203649deb9fc0c34369a408747812f586d4152a60d58258dfe02
|
|
BLAKE2b-256 checksum How to use checksums |
54d4617c251263ba2d2649f02f830d8c354dedb70d7339b6efde813e31914fe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / gleplot-6.1.0-py3-none-any.whl
| Download URL | gleplot-6.1.0-py3-none-any.whl |
|---|---|
| Size | 558.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de6ea681ec7ba5105c77fc61274cac859ae23e071985ee0f60ad1ab7335ae282
|
|
BLAKE2b-256 checksum How to use checksums |
7cd24f09bf89ea9ae441de71420bf7df918c0dc3f0c49c30fb9cd859108a89a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for gleplot 6.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gleplot-6.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.