gplately.CartopyPlotEngine

class gplately.CartopyPlotEngine[source]

Bases: PlotEngine

Use Cartopy for map plotting.

__init__()[source]

Methods

__init__()

plot_geo_data_frame(ax_or_fig, gdf, **kwargs)

Use Cartopy to plot geometries in a GeoDataFrame object onto a map

plot_grid(ax_or_fig, grid[, projection, extent])

Plot a grid onto a map using Cartopy

plot_pygplates_features(ax_or_fig, features, ...)

Not implemented yet

plot_subduction_zones(ax_or_fig, ...[, color])

Use Cartopy to plot subduction zones with "teeth" onto a map

plot_geo_data_frame(ax_or_fig, gdf: GeoDataFrame, **kwargs)[source]

Use Cartopy to plot geometries in a GeoDataFrame object onto a map

Parameters:
  • ax_or_fig (cartopy.mpl.geoaxes.GeoAxes) – Cartopy GeoAxes instance

  • gdf (GeoDataFrame) – GeoPandas GeoDataFrame object

plot_grid(ax_or_fig, grid, projection=None, extent=(-180, 180, -90, 90), **kwargs)[source]

Plot a grid onto a map using Cartopy

Parameters:
  • ax_or_fig (cartopy.mpl.geoaxes.GeoAxes) – Cartopy GeoAxes instance

  • grid (2D array-like) – The grid data to be plotted

  • projection (cartopy.crs.Projection) – The projection to use for the grid

  • extent (tuple) – The extent of the grid in the form (min_lon, max_lon, min_lat, max_lat)

  • **kwargs – Keyword arguments for plotting the grid. See Matplotlib’s imshow() keyword arguments here.

plot_pygplates_features(ax_or_fig, features, **kwargs)[source]

Not implemented yet

plot_subduction_zones(ax_or_fig, gdf_subduction_left: GeoDataFrame, gdf_subduction_right: GeoDataFrame, color='blue', **kwargs)[source]

Use Cartopy to plot subduction zones with “teeth” onto a map

Parameters:
  • ax_or_fig (cartopy.mpl.geoaxes.GeoAxes) – Cartopy GeoAxes instance

  • gdf_subduction_left (GeoDataFrame) – subduction zone with “left” polarity

  • gdf_subduction_right (GeoDataFrame) – subduction zone with “right” polarity

  • color (str) – The colour used to fill the “teeth”.