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-2025.12.1.tar.gz (55.7 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-2025.12.1-py3-none-any.whl (56.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pygmt_helper-2025.12.1.tar.gz
Algorithm Hash digest
SHA256 641ad8cbba01b62feb76c0918d676ed774aa566296a28e1fe17103f4487f9d98
MD5 64e841b8d46d72c254ba57f9e80558d0
BLAKE2b-256 e6bdc990009bc16af1eb7772f45bc7533acede74306d2be1983140232a8f3136

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygmt_helper-2025.12.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-2025.12.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pygmt_helper-2025.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5252f9912b1d2c60b2905f42edcbba692bfcb605efbea26ab4b7178100cefcdc
MD5 3e575720e0fca23ac103498bce924e69
BLAKE2b-256 eed34c32e790ebbc8eddaa80db3dc8f0992941b454537bbe82377d42036164fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygmt_helper-2025.12.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