Skip to main content

PyGMT helper package

Project description

pygmt helper package

This package contains a set of helper functions for pygmt that allow for easy generation of NZ based spatial plots. Additionally, it also contains some functionality to generate some common plots, such as IM plots or fault traces plot.

The aim of this package is to make the common steps of creating a pygmt based spatial plot easy, for specific details the user can also add in some pygmt calls directly.

Installation

Follow the installation instructions from pygmt. Then install this package via pip.

Run-Time

Running with NZ specific map data will result in much longer plotting times. Therefore, it is recommended to just it to None when iterating on the plot and only enable it for the final version. Same applies for the high_res_topo option when loading the map data.

General usage

import pandas as pd

from pygmt_helper import plotting

# Load some spatial data
# with columns lat, lon, key
# where key is whatever you want to plot
data_df = pd.read_csv("bla")

# Create figure
fig = plotting.gen_region_fig("Title")

# Interpolate
grid = plotting.create_grid(data_df, "key")

# Plot the grid
plotting.plot_grid(fig, grid, "hot", (0, 10, (10 - 0) / 10))

# Add anything else to plot
# via pygmt
...

# Save the figure
fig.savefig(
    "/path_to_somwhere/figure.png",
    dpi=900,
    anti_alias=True,
)

Examples

The example folder contains multiple complete examples plots.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygmt_helper-2026.6.1.tar.gz (55.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygmt_helper-2026.6.1-py3-none-any.whl (56.1 MB view details)

Uploaded Python 3

File details

Details for the file pygmt_helper-2026.6.1.tar.gz.

File metadata

  • Download URL: pygmt_helper-2026.6.1.tar.gz
  • Upload date:
  • Size: 55.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygmt_helper-2026.6.1.tar.gz
Algorithm Hash digest
SHA256 482253f10480b3af3ac4a13b59298c24d4ebce60f4ba0cced967181281340b9c
MD5 7ce0baa534289c1cb5a3d17bdb6c9891
BLAKE2b-256 ac98aae8f116471c3efb657bdaa4d5924886c7d0819d03b40eb06e1d8bbddb37

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygmt_helper-2026.6.1.tar.gz:

Publisher: publish-PyPI.yml on ucgmsim/pygmt_helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygmt_helper-2026.6.1-py3-none-any.whl.

File metadata

  • Download URL: pygmt_helper-2026.6.1-py3-none-any.whl
  • Upload date:
  • Size: 56.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygmt_helper-2026.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 294be17bb068a5cc58325680286c79cec6bf54f2d5b0740035268d1c3b70aba8
MD5 e9349f4e23386e666b7f0fd621e056be
BLAKE2b-256 04b1711b6c1524bbb208a50e168ec4d7614811d560376f5350b9b76845c33020

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygmt_helper-2026.6.1-py3-none-any.whl:

Publisher: publish-PyPI.yml on ucgmsim/pygmt_helper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page