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.2.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.2.1-py3-none-any.whl (56.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygmt_helper-2026.2.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.7

File hashes

Hashes for pygmt_helper-2026.2.1.tar.gz
Algorithm Hash digest
SHA256 7603578b63af6c2be0514876784dcee467b9d8f9a58586df5c1fdf6c6b231f5f
MD5 2088d60370bd51820084972941f4214c
BLAKE2b-256 d34666524ab12be6411f265e87f0d70d769d5f17cac82db26825b6806dd13176

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pygmt_helper-2026.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d15ffd34c4547cb67d3d262dfeb267710634bfb8567cbfb05e0a17f1193111
MD5 35db423665454aaa9b6a41131f2758dd
BLAKE2b-256 c89b60cf337d1da449a1691c1fe6463b24dee20bf946cd558ce033b4847ab735

See more details on using hashes here.

Provenance

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