Skip to main content

eofigs

Tests Docs License: MIT

Analysis-aware, publication-ready figures for Earth observation research.

eofigs turns Earth observation analysis outputs (rasters, time series, validation pairs) into journal-ready figures that know the analysis, the variable and the printed size:

  • Recipe figures for common analyses: trend with significance, event composites, and later recovery, burn severity, disturbance and divergence.
  • A variable library with fixed colour maps, symbols and units, so NDVI, LST or GPP look the same in every figure, and their anomalies and trends get zero-centred diverging colours.
  • Print-size rendering: rasters are read and reduced to the pixels the printed figure needs, from its width in mm and its dpi, keeping memory use and PDF size small.
  • Journal presets and one-call export to vector PDF plus 600 dpi PNG or TIFF, with a check of size, resolution, smallest font, font embedding and colour-blind safety.
Study area map: Swat valley
Study area map: Swat valley
Study area map: single column
Study area map: single column
House style
House style
Journal style and export
Journal style and export
Large raster at print size
Large raster at print size
Trend and significance
Trend and significance
Trend map: Swat valley NDVI 2001–2024
Trend map: Swat valley NDVI 2001–2024
Trend map with latitude profile
Trend map with latitude profile
Built-in palettes
Built-in palettes
Event composite: Swat hot-dry months
Event composite: Swat hot-dry months
Event composite with significance
Event composite with significance
Accuracy scatter: ICESat-2 against a DEM
Accuracy scatter: ICESat-2 against a DEM
Accuracy scatter: calibration and validation
Accuracy scatter: calibration and validation

More in the gallery, with the code for each figure.

Installation

pip install eofigs

eofigs needs Python 3.11 or newer. On Windows and macOS, conda-forge is the simplest source of its geospatial libraries; see the installation guide.

Quick start

import numpy as np
import eofigs

eofigs.set_style("elsevier")  # fonts, sizes and widths of the journal
rng = np.random.default_rng(1)
field = rng.gamma(5, 30, 300)  # observed aboveground biomass (Mg ha⁻¹)
model = 0.9 * field + rng.normal(10, 20, 300)  # predicted
fig = eofigs.accuracy_scatter(field, model, variable="agb")
print(fig.eofigs_layout["caption"])  # a ready caption sentence
print(eofigs.check_figure(fig))  # size, dpi, smallest font, fonts, colour-blind safety
eofigs.save_figure(fig, "fig_agb")  # vector PDF and a 600 dpi raster

More in the quickstart and the gallery.

Run with Docker

A container image with eofigs and its geospatial stack (cartopy, rioxarray, geopandas, fonts) is published on GitHub Container Registry for each release (0.1.0, latest; dev follows the main branch):

docker run --rm -v "$PWD":/work ghcr.io/kmkamilkhel/eofigs:0.1.0 python script.py

Roadmap

Available in v0.1: set_style, style, new_figure, label_panels, save_figure, check_figure, cvd_preview, tidy_axes, palettes, variable, register_variable, fit_raster, trend, figure_set, study_area_map, add_north_arrow, add_scale_bar, add_inset, trend_map, event_composite and accuracy_scatter.

v0.1

Function Purpose
set_style, new_figure, save_figure Journal presets (Elsevier, Springer, MDPI, Wiley, Frontiers, Taylor & Francis), widths in mm, one-call export
check_figure, cvd_preview Size, dpi, smallest font, embedded fonts, colour-blind safety; preview as seen with colour-vision deficiencies
palettes, tidy_axes Built-in palettes and colour maps; a few ticks at round values
figure_set Manuscript figure set with automatic Fig/FigS numbering and a manifest
variable, register_variable Variable library: colour map, symbol, unit, range
fit_raster Reduce large rasters to the pixels the printed figure needs
trend Theil–Sen slope with Mann–Kendall test on a time-series cube
study_area_map DEM hillshade, overlay, labelled points, locator inset, graticule, north arrow to true north, scale bar, legend; automatic layout
trend_map Trend map with zero-centred colours, significance dots, optional latitude profile
event_composite Before/during/after anomaly maps with a composite time series
accuracy_scatter Observed against predicted values with the 1:1 line, a fitted line (Piñeiro et al. 2008), R², RMSE, NMAD and bias, density colours or groups

v0.2: burn severity, recovery and disturbance recipes, SHAP and partial dependence styling, confusion matrix, Google Earth Engine input through Xee at print scale.

v0.3: R package with matching function names.

Contributing

Questions and ideas are welcome in Discussions; bugs and feature requests in Issues. See CONTRIBUTING.md and the Code of Conduct.

Citation

If you use eofigs, please cite it using the metadata in CITATION.cff.

License

MIT. See LICENSE. Data files have their own licences, listed in DATA_LICENSES.md.

Metadata

Release files for eofigs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eofigs 0.1.0
File Size Uploaded Provenance Actions
eofigs-0.1.0.tar.gz 1.1 MB With provenance Details for eofigs-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eofigs 0.1.0
File Interpreter ABI Platform Actions
eofigs-0.1.0-py3-none-any.whl Python 3 none any Details for eofigs-0.1.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / eofigs-0.1.0.tar.gz

Download URL eofigs-0.1.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
25f7d1ae591a774b23a3111c658edbc6e70843613b92f8a9b01aae57e2c8fff6
BLAKE2b-256 checksum
How to use checksums
0222e407560f04d3f8e03378ca5c9feceaa7b5a07add3c21eb8b62b17a8410ca
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 8, 2026.

Transparency log

Release files / eofigs-0.1.0-py3-none-any.whl

Download URL eofigs-0.1.0-py3-none-any.whl
Size 174.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afdc4097e356878c8da193781e05a7c8a691b85b3bebff6db29bd82a6b833615
BLAKE2b-256 checksum
How to use checksums
f8a46ef5b6f345890c2c6e3dc9d1fa0b881282521f2bd761b899a8360312315c
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 8, 2026.

Transparency log

Security for eofigs 0.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.

Select from 2 files

Attestation for eofigs-0.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 8, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page