gplately.PygmtPlotEngine
- class gplately.PygmtPlotEngine[source]
Bases:
PlotEngineUse PyGMT for map plotting.
Methods
__init__()plot_geo_data_frame(ax_or_fig, gdf, **kwargs)Use PyGMT to plot geometries in a GeoDataFrame object onto a map.
plot_grid(ax_or_fig, grid[, projection, ...])Use PyGMT to plot a grid onto a map.
plot_pygplates_features(ax_or_fig, features, ...)Not implemented yet
plot_subduction_zones(ax_or_fig, ...[, color])Use PyGMT to plot subduction zones with "teeth"
- plot_geo_data_frame(ax_or_fig, gdf: GeoDataFrame, **kwargs)[source]
Use PyGMT to plot geometries in a GeoDataFrame object onto a map.
- Parameters:
ax_or_fig (pygmt.Figure()) – pygmt Figure object
gdf (GeoDataFrame) – GeoPandas GeoDataFrame object
edgecolor (str) – For polygons, it is the border colour. For polylines, it is the line colour. Currently, only colour names are tested and officially supported, for example, “red”, “blue”, etc.
facecolor (str) – The colour used to fill the polygon.
fill (str) – GMT “fill” parameter
pen (str) – GMT “pen” parameter
style (str) – GMT “style” parameter
gmtlabel (str) – GMT “label” parameter
- plot_grid(ax_or_fig, grid, projection=None, extent=(-180, 180, -90, 90), cmap='gmt/geo', nan_transparent=False, **kwargs)[source]
Use PyGMT to plot a grid onto a map.
- Parameters:
ax_or_fig (pygmt.Figure()) – A PyGMT Figure object.
grid (Raster) – A gplately Raster object or 2D array-like grid data.
projection (str) – Not used currently.
extent (str or tuple) – (xmin, xmax, ymin, ymax). See details at https://www.pygmt.org/dev/tutorials/basics/regions.html
cmap (str) – A built-in GMT colormaps name or a CPT file path.
nan_transparent (bool) – If True, NaN values in the grid will be plotted as transparent.
**kwargs – Additional keyword arguments.