mtuq.graphics.attrs.PyGMTUtilities

class mtuq.graphics.attrs.PyGMTUtilities[source]

Bases: object

Utility class for PyGMT plotting backend.

This class offers a set of static methods designed for enhancing and simplifying the usage of PyGMT for plotting by handling plotting regions, color maps, LaTeX annotations, and plot headers.

Note

The class is designed to be used without instantiation due to its static methods. This approach helps in organizing code related to the PyGMT plotting backend and avoids confusion with other plotting backends.

Methods include calculating plotting regions with buffers, configuring colormaps, preparing LaTeX annotations for PyGMT, and generating standardized headers for plots.

Examples and more detailed method descriptions can be found in the documentation of each method.

Public Methods

calculate_plotting_region

Calculates the region for plotting, including a buffer area around specified stations and origin.

configure_colormap

Adjusts the given colormap name for compatibility with PyGMT and matplotlib conventions.

draw_coastlines

Draws coastlines and fills water areas with a transparent blue shade.

get_header

Generates a header for a plot based on the provided parameters.

get_resolution

Determines the appropriate PyGMT etopo grid resolution based on longitude and latitude ranges.

prepare_latex_annotations

Prepares LaTeX annotations for plotting.