Skip to main content

PyPI Tests Python Original code license Contributions

Azimlib

Independent cartography in Python, with a familiar plotting API.

Build maps from geographic data, compose scientific figures, and explore them in an interactive viewer. Azimlib owns its geometry, projections, coordinate transformations, map layers, layout and rendering. Matplotlib and other GIS engines are not runtime dependencies.

Getting started · API reference · Examples · Compatibility

Maps rendered by Azimlib: Brazil, a thematic map, an orthographic globe and synthetic terrain

The examples above use Azimlib's own renderer. Boundaries and rivers are from Natural Earth; thematic values, terrain and vectors are synthetic. See the reproducible showcase.

Unpublished 0.4.0 candidate scope

Local candidate metadata is 0.4.0; the published stable package remains 0.3.0. The 0.4 development rescope preserves 112 original IDs: 107 completed, four deferred, one pending item (14.08: final acceptance and publication). Optional GPU and scientific eclipse use are experimental; no universal 33 ms/100 ms or certified eclipse forecast is promised. PBF has regional real-data validation, not proven planetary scale. Measured evidence. 0.5 remains Planetary Cartography / Beyond Earth; 0.6 remains Orbits.

Install

Requires Python 3.10 or newer. Azimlib is available on PyPI. Choose the output you need:

python -m pip install azimlib           # SVG and portable HTML; no dependencies
python -m pip install "azimlib[png]"    # PNG export
python -m pip install "azimlib[gui]"    # Interactive desktop viewer + PNG

For development, install directly from the source:

git clone https://github.com/Kernerian/azimlib.git
cd azimlib
python -m pip install ".[gui]"

The desktop viewer requires Tk, normally included with official Windows and macOS Python installations; on Linux it may need an operating-system package. Pillow, aggdraw and NumPy provide low-level raster support. Optional azimlib[accelerate] uses NumPy/Numba to compile Azimlib's own coverage kernel. No external cartography library is required for any of these installations.

Your first map

Both import styles expose the familiar figure/axes workflow:

import azimlib as azl
# Or: import azimlib.pyplot as plt

fig, ax = azl.subplots(figsize=(8, 9), projection="mercator")
ax.map("brazil", facecolor="white", edgecolor="black", linewidth=0.8)
ax.states(edgecolor="#777777", linewidth=0.4)
ax.rivers(color="#237f96", linewidth=0.8, label="Rivers")
ax.scatter(
    lon=[-46.63, -43.17], lat=[-23.55, -22.90],
    s=[40, 60], c="#c34968", label="Cities",
)
ax.set_title("Brazil")
ax.set_xlabel("Longitude")
ax.set_ylabel("Latitude")
ax.legend()
ax.scale_bar()
ax.north_arrow()

fig.savefig("brazil.svg")        # Static export; no viewer controls
fig.savefig("brazil.png", dpi=200)
azl.show()                       # Interactive desktop viewer

Longitude and latitude are geographic coordinates. Use subplot_kw={"projection": "mercator"} if you prefer the Matplotlib-style subplot configuration. A GeoJSON path, dictionary or feature collection can be added with ax.geojson(data).

savefig() writes a static PNG or SVG. show() opens the independent desktop canvas with Home, Back, Forward, Pan, Zoom, Subplots, Save and cursor coordinates. A separate portable HTML viewer is available with fig.show(backend="browser", path="map.html"); it navigates an exported scene, without a live Python connection.

For the recommended plain light figure, see clean view and clean_map.py. Azimlib 0.3 adds opt-in map rotation and composition contracts.

Add only the components you need

Grid, legend, colorbar, scale bar, north arrow, compass and overview map are optional. There is no default minimap or grid. North arrow and compass are separate components, and a legend has a title only when you provide one.

ax.grid(linestyle="--", linewidth=0.5)
scale = ax.scale_bar()
scale.set_visible(False)
scale.set_visible(True)
ax.compass()
ax.overview(context="brazil")
fig.canvas.draw_idle()

Artists expose editing, visibility and removal controls. You can set limits, change styles, edit labels and update scalar data while retaining the same figure. See components and Artist editing.

Thematic and scientific maps

import azimlib.pyplot as plt
from azimlib import datasets

data = datasets.load("states", country="brazil")
values = list(range(len(data["features"])))  # Synthetic example values

fig, ax = plt.subplots(projection="mercator")
layer = ax.choropleth(data, values, cmap="viridis", bins=None)
bar = fig.colorbar(layer, ax=ax, orientation="horizontal", label="Example value")
ax.set_title("Values by state")
layer.set_clim(0, 30)
bar.set_label("Updated example value")
fig.savefig("thematic.svg")
Build With
Political and regional maps Countries, states, boundaries, ax.state("SP")
Physical and hydrographic maps Coastlines, rivers, lakes, geographic labels
Choropleths and categories Feature styles, colormaps, norms, editable colorbars
Points and proportional bubbles Scatter, markers, symbols, values mapped to size/color
Routes and vector fields Styled lines, arrows, spherical routes, quiver
Density and scalar fields Heatmaps, raster fields, isolines, hillshade
Atlases and regional focus Subplots, GridSpec, mosaics, shared axes, insets/overviews

Lines support widths, opacity, dashes, caps, joins and arrows; polygons support per-feature styling and hatches. Text offers alignment, rotation, backgrounds and halos. Layout includes tight/constrained modes, physical sizing and editable ticks. Colorbars support horizontal/vertical placement, ticks, labels and norms.

The spherical projection implementations include equirectangular, Mercator, orthographic, Lambert conformal conic, Albers equal area and Equal Earth. An orthographic globe is a 2D projection, not a 3D terrain engine.

Learn more

Azimlib is an early independent cartography library, not a complete replacement for every Matplotlib API. Read the compatibility boundaries before migrating. Detailed views can still require expensive rasterization. Automated CI covers Windows, Linux and macOS. The recorded human visual acceptance also covers Linux/macOS native artifacts; screenshots do not establish physical mouse latency.

Documentation and validation

Development documentation · Migration guide · Integrated gallery · API stability

The 80-item checklist records implementation, validation and release acceptance separately. See the urban guide for cities, neighbourhoods, streets and buildings.

Contribute and get help

Report bugs or ask questions through GitHub Issues. Include a minimal example, Python/Azimlib versions and the relevant output format. See the contribution guide for local tests, data provenance and independent implementation requirements. Please follow the code of conduct. Use the security policy for sensitive vulnerability reports.

License and provenance

Original code and visual compositions: BSD 3-Clause, copyright 2026 Kernerian. Bundled geographic data, fonts and palettes retain their own terms: Natural Earth is public domain; DejaVu fonts retain their license; Viridis, Plasma, Inferno and Magma tables are CC0; Blues retains ColorBrewer terms. The default AZIM10 color sequence is independently selected.

This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).

See LICENSE, third-party notices and branding assets. The familiar API and navigation are implemented independently; Matplotlib artwork and source code are not distributed as Azimlib's implementation.

Azimlib 0.3 capabilities

Azimlib 0.3 adds independent SHP/SHX/DBF, KML, local OSM XML and scalar georeferenced raster/GeoTIFF readers. See formats and limits and versioned optional data. The real urban OSM example keeps its database license separate and is never downloaded implicitly.

Geodesy, UTM and crossing viewports use own implementations with explicit numerical limits. Visual finishing includes curved labels, limited equations, provenance-aware symbols/patterns and own vector PDF; see the original gallery.

Interaction includes optional picking, widgets, local live viewers, Qt and notebook updates. Experimental own 3D terrain and building extrusion document metric units, camera/depth rendering, export policy and performance limits. Temporal maps and regional atlas have finite sources, explicit writers and bounded playback.

Read the 0.3.0 release notes, migration guide, API policy and release checklist. The hosted stable documentation and version 0.3.0 documentation identify their exact source revision in the site manifest. The development alias currently mirrors 0.3.0. Published versions are listed on PyPI.

Metadata

Release files for azimlib 0.4.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 azimlib 0.4.0
File Size Uploaded
azimlib-0.4.0.tar.gz 23.6 MB Details

Built distribution (wheel)

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

Total release size: 27.2 MB

Release files / azimlib-0.4.0.tar.gz

Download URL azimlib-0.4.0.tar.gz
Size 23.6 MB
Tags Source
SHA-256 checksum
How to use checksums
666d1998760ea647890900be9c4cb1b9b8fac5446d08fda6663719648db69f77
BLAKE2b-256 checksum
How to use checksums
eb1b9c54cbff034280098aff7bd17c14d5fc1c40615a0e9482561932035fd99b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 16, 2026.

Transparency log

Release files / azimlib-0.4.0-py3-none-any.whl

Download URL azimlib-0.4.0-py3-none-any.whl
Size 3.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0dcbed4a30c7c6bfe74d050cd95119e85731c342b167b098d6b9d9bb7567e7e7
BLAKE2b-256 checksum
How to use checksums
adbaac913f496315f6281d996b53cd0ec60decbb6ccb336a596b4af2fa3a9342
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

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