gplately.PlotTopologies

class gplately.PlotTopologies(plate_reconstruction, coastlines=None, continents=None, COBs=None, time: float = 140.0, anchor_plate_id=None, plot_engine: PlotEngine = <gplately.mapping.cartopy_plot.CartopyPlotEngine object>)[source]

Bases: object

Read, reconstruct and plot topology features at specific reconstruction times.

The PlotTopologies class:

  • Read features held in GPlates GPML (GPlates Markup Language) files and ESRI shapefiles.

  • Reconstruct the locations of these features as they migrate through geological time.

  • Turn these reconstructed features into Shapely geometries for plotting.

To create the PlotTopologies object, supply:

and optionally,

  • a coastline_filename

  • a continent_filename

  • a COB_filename

  • a reconstruction time

  • an anchor_plate_id

For example:

 1# create a PlotTopologies object
 2gplot = gplately.plot.PlotTopologies(
 3    plate_reconstruction,
 4    coastline_filename=None,
 5    continent_filename=None,
 6    COB_filename=None,
 7    time=100,
 8    anchor_plate_id=None,
 9)
10
11# Setting a new reconstruction time
12gplot.time = 20  # Ma

The coastline_filename, continent_filename and COB_filename can be paths (str) to GPML and/or shapefiles, as well as instances of pygplates.FeatureCollection.

Some features for plotting (like plate boundaries) are taken from the PlateReconstruction.topology_features. They have already been reconstructed to the given time. Simply provide a new reconstruction time by changing the time attribute, e.g.

1gplot.time = 20 # Ma

which will automatically reconstruct all topologies to the specified time. You MUST set gplot.time before plotting anything.

A variety of geological features can be plotted on maps, including:

  • subduction boundaries & subduction polarity teeth

  • mid-ocean ridge boundaries

  • transform boundaries

  • miscellaneous boundaries

  • coastline polylines

  • continental polygons and

  • continent-ocean boundary polylines

  • topological plate velocity vector fields

  • netCDF4 MaskedArray or ndarray raster data:
    • seafloor age grids

    • paleo-age grids

    • global relief (topography and bathymetry)

  • assorted reconstructable feature data, for example:
    • seafloor fabric

    • large igneous provinces

    • volcanic provinces

__init__(plate_reconstruction, coastlines=None, continents=None, COBs=None, time: float = 140.0, anchor_plate_id=None, plot_engine: PlotEngine = <gplately.mapping.cartopy_plot.CartopyPlotEngine object>)[source]

Constructor. Create a PlotTopologies object.

Parameters:

Methods

__init__(plate_reconstruction[, coastlines, ...])

Constructor.

get_all_topological_sections([...])

Return the reconstructed topological plate boundary sections listed below as a geopandas.GeoDataFrame object.

get_all_topologies([central_meridian, ...])

Return the reconstructed topological features listed below as a geopandas.GeoDataFrame object.

get_coastlines([central_meridian, ...])

Return the reconstructed coastlines as a geopandas.GeoDataFrame object.

get_continent_ocean_boundaries([...])

Return the reconstructed continent-ocean boundaries as a geopandas.GeoDataFrame object.

get_continental_crusts([central_meridian, ...])

Return the reconstructed continental crust lines as a geopandas.GeoDataFrame object.

get_continental_rifts([central_meridian, ...])

Return the reconstructed continental rift lines as a geopandas.GeoDataFrame object.

get_continents([central_meridian, ...])

Return the reconstructed continental polygons as a geopandas.GeoDataFrame object.

get_extended_continental_crusts([...])

Return the reconstructed extended continental crust lines as a geopandas.GeoDataFrame object.

get_faults([central_meridian, ...])

Return the reconstructed fault lines as a geopandas.GeoDataFrame object.

get_feature(feature[, central_meridian, ...])

Convert feature(s) to a geopandas.GeoDataFrame object.

get_fracture_zones([central_meridian, ...])

Return the reconstructed fracture zone lines as a geopandas.GeoDataFrame object.

get_inferred_paleo_boundaries([...])

Return the reconstructed inferred paleo boundary lines as a geopandas.GeoDataFrame object.

get_misc_boundaries([central_meridian, ...])

Return the reconstructed "other" lines as a geopandas.GeoDataFrame object.

get_misc_transforms([central_meridian, ...])

Deprecated! DO NOT USE.

get_orogenic_belts([central_meridian, ...])

Return the reconstructed orogenic belt lines as a geopandas.GeoDataFrame object.

get_passive_continental_boundaries([...])

Return the reconstructed passive continental boundary lines as a geopandas.GeoDataFrame object.

get_ridges([central_meridian, ...])

Return the reconstructed mid-ocean ridge lines (gpml:MidOceanRidge) as a geopandas.GeoDataFrame object.

get_ridges_and_transforms([...])

Deprecated! DO NOT USE.

get_slab_edges([central_meridian, ...])

Return the reconstructed slab edge lines as a geopandas.GeoDataFrame object.

get_subduction_direction([central_meridian, ...])

Return the PlotTopologies.trench_left and PlotTopologies.trench_right as a geopandas.GeoDataFrame object.

get_sutures([central_meridian, ...])

Return the reconstructed suture lines as a geopandas.GeoDataFrame object.

get_terrane_boundaries([central_meridian, ...])

Return the reconstructed terrane boundary lines as a geopandas.GeoDataFrame object.

get_topological_plate_boundaries([...])

Return the reconstructed topological plate boundaries(polygons) as a geopandas.GeoDataFrame object.

get_transforms([central_meridian, ...])

Return the reconstructed transform lines(gpml:Transform) as a geopandas.GeoDataFrame object.

get_transitional_crusts([central_meridian, ...])

Return the reconstructed transitional crust lines as a geopandas.GeoDataFrame object.

get_trenches([central_meridian, ...])

Return the reconstructed trench lines as a geopandas.GeoDataFrame object.

get_unclassified_features([...])

Return the reconstructed unclassified feature lines as a geopandas.GeoDataFrame object.

plot_all_topological_sections(ax[, color, ...])

Plot the reconstructed topological boundary sections(polylines) on a map.

plot_all_topologies(ax[, color])

Plot the reconstructed topological features listed below on a map.

plot_coastlines(ax[, color])

Plot reconstructed coastlines on a map.

plot_continent_ocean_boundaries(ax[, color])

Plot the reconstructed continent-ocean boundaries (COBs) on a map.

plot_continental_crusts(ax[, color])

Plot continental crust lines on a map.

plot_continental_rifts(ax[, color])

Plot continental rifts on a map.

plot_continents(ax[, color])

Plot the reconstructed continental polygons on a map.

plot_extended_continental_crusts(ax[, color])

Plot extended continental crust lines on a map.

plot_faults(ax[, color])

Plot faults on a map.

plot_feature(ax, feature[, feature_name, color])

Plot pygplates.FeatureCollection or pygplates.Feature onto a map.

plot_fracture_zones(ax[, color])

Plot fracture zones on a map.

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

Plot a grid onto a map.

plot_grid_from_netCDF(ax_or_fig, filename[, ...])

Read raster data from a netCDF file and plot it on a map.

plot_inferred_paleo_boundaries(ax[, color])

Plot inferred paleo boundaries on a map.

plot_misc_boundaries(ax[, color])

Plot the reconstructed miscellaneous plate boundary sections(polylines) on a map.

plot_misc_transforms(ax[, color])

Deprecated! DO NOT USE.

plot_orogenic_belts(ax[, color])

Plot orogenic belts on a map.

plot_passive_continental_boundaries(ax[, color])

Plot passive continental boundaries on a map.

plot_plate_id(*args, **kwargs)

Deprecated! DO NOT USE!

plot_plate_motion_vectors(ax_or_fig[, ...])

Calculate plate motion velocity vector fields at a particular geological time and plot them on a map.

plot_plate_polygon_by_id(ax_or_fig, plate_id)

Plot a plate polygon with the given plate_id on a map.

plot_pole(ax_or_fig, lon, lat, a95[, color])

Plot a paleomagnetic pole onto a map.

plot_ridges(ax[, color])

Plot the reconstructed mid-ocean ridge lines(gpml:MidOceanRidge) on a map.

plot_ridges_and_transforms(ax[, color])

Deprecated! DO NOT USE!

plot_slab_edges(ax[, color])

Plot slab edges on a map.

plot_subduction_teeth(ax[, spacing, size, ...])

Plot subduction teeth.

plot_sutures(ax[, color])

Plot sutures on a map.

plot_terrane_boundaries(ax[, color])

Plot terrane boundaries on a map.

plot_topological_plate_boundaries(ax[, color])

Plot the topological plate boundaries(polygons).

plot_transforms(ax[, color])

Plot transform boundaries(gpml:Transform) on a map.

plot_transitional_crusts(ax[, color])

Plot transitional crust on a map.

plot_trenches(ax[, color])

Plot the reconstructed trenches on a map.

plot_unclassified_features(ax[, color])

Plot GPML unclassified features on a map.

Attributes

anchor_plate_id

Anchor plate ID for reconstruction.

misc_transforms

Deprecated! DO NOT USE.

ridge_transforms

Deprecated! DO NOT USE!

ridges

Mid-ocean ridge features (all the features which are labelled as gpml:MidOceanRidge in the model).

time

The time (Ma) to reconstruct and plot geological features to.

topological_plate_boundaries

Resolved topologies for rigid boundaries ONLY.

topologies

Resolved topologies for BOTH rigid boundaries and networks.

transforms

Transform boundary features (all the features which are labelled as gpml:Transform in the model).

plate_reconstruction

The PlateReconstruction object will be used to access a plate rotation_model and a set of topology_features which contains plate boundary features like trenches, ridges and transforms.

base_projection

Cartopy map projection.

coastlines

A list containing coastline features reconstructed to the specified time attribute.

continents

A list containing continent features reconstructed to the specified time attribute.

COBs

A list containing COB features reconstructed to the specified time attribute.

trenches

A list of pygplates.FeatureType.gpml_subduction_zone features regardless of their subduction polarity.

trench_left

A list of pygplates.FeatureType.gpml_subduction_zone features whose subduction polarity is "left".

trench_right

A list of pygplates.FeatureType.gpml_subduction_zone features whose subduction polarity is "right".

other

A list of miscellaneous topological plate boundary sections, which are not subduction zones or mid-ocean ridges (ridge/transform).

COBs

A list containing COB features reconstructed to the specified time attribute.

Type:

iterable/list of pygplates.ReconstructedFeatureGeometry

property anchor_plate_id

Anchor plate ID for reconstruction. Must be an integer >= 0. Defaults to PlateReconstruction.anchor_plate_id.

Type:

int

base_projection

Cartopy map projection. Defaults to cartopy.crs.PlateCarree.

coastlines

A list containing coastline features reconstructed to the specified time attribute.

Type:

iterable/list of pygplates.ReconstructedFeatureGeometry

continents

A list containing continent features reconstructed to the specified time attribute.

Type:

iterable/list of pygplates.ReconstructedFeatureGeometry

get_all_topological_sections(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed topological plate boundary sections listed below as a geopandas.GeoDataFrame object.

  • ridges and transforms

  • subduction zones (trenches)

  • other miscellaneous boundary sections that are neither subduction zones nor mid-ocean ridges (ridge/transform)

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed all topological sections geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_all_topologies(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed topological features listed below as a geopandas.GeoDataFrame object.

  • pygplates.FeatureType.gpml_topological_network

  • pygplates.FeatureType.gpml_oceanic_crust

  • pygplates.FeatureType.gpml_topological_slab_boundary

  • pygplates.FeatureType.gpml_topological_closed_plate_boundary

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed topologies geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_coastlines(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed coastlines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed coastlines geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_continent_ocean_boundaries(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed continent-ocean boundaries as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed COBs geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_continental_crusts(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed continental crust lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed continental crusts geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_continental_rifts(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed continental rift lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed continental rifts geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_continents(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed continental polygons as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed continents geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_extended_continental_crusts(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed extended continental crust lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed extended continental crusts geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_faults(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed fault lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed faults geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_feature(feature, central_meridian=0.0, tessellate_degrees=None, validate_reconstruction_time=True)[source]

Convert feature(s) to a geopandas.GeoDataFrame object.

Parameters:

feature (pygplates.Feature, pygplates.ReconstructedFeatureGeometry, pygplates.GeometryOnSphere or iterable of the aforementioned three) – Feature object(s).

Returns:

gdf – A geopandas.GeoDataFrame object contaning the feature geometries.

Return type:

geopandas.GeoDataFrame

Note

The feature(s) needed to produce the geopandas.GeoDataFrame object should already be reconstructed to a time. This function converts the feature(s) into a set of Shapely geometries and put them into a geopandas.GeoDataFrame object.

get_fracture_zones(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed fracture zone lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed fracture zones geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_inferred_paleo_boundaries(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed inferred paleo boundary lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed inferred paleo-boundaries geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_misc_boundaries(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed “other” lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed other geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_misc_transforms(central_meridian=0.0, tessellate_degrees=None)[source]

Deprecated! DO NOT USE.

get_orogenic_belts(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed orogenic belt lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed orogenic belts geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_passive_continental_boundaries(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed passive continental boundary lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed passive continental boundaries geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_ridges(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed mid-ocean ridge lines (gpml:MidOceanRidge) as a geopandas.GeoDataFrame object.

Note

This function only returns the reconstructed mid-ocean ridges as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed ridges geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_ridges_and_transforms(central_meridian=0.0, tessellate_degrees=1)[source]

Deprecated! DO NOT USE.

get_slab_edges(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed slab edge lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed slab edges geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_subduction_direction(central_meridian=0.0, tessellate_degrees=None)[source]

Return the PlotTopologies.trench_left and PlotTopologies.trench_right as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

get_sutures(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed suture lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed sutures geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_terrane_boundaries(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed terrane boundary lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed terrane boundaries geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_topological_plate_boundaries(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed topological plate boundaries(polygons) as a geopandas.GeoDataFrame object.

get_transforms(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed transform lines(gpml:Transform) as a geopandas.GeoDataFrame object.

Note

This function only returns the reconstructed transforms as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed transforms geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_transitional_crusts(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed transitional crust lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed transitional crusts geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_trenches(central_meridian=0.0, tessellate_degrees=1)[source]

Return the reconstructed trench lines as a geopandas.GeoDataFrame object.

Note

This function only returns the reconstructed trenches as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed trenches geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

get_unclassified_features(central_meridian=0.0, tessellate_degrees=None)[source]

Return the reconstructed unclassified feature lines as a geopandas.GeoDataFrame object.

Parameters:
  • central_meridian (float, default=0.0) – The central meridian of the map. This will affect the dateline wrapping.

  • tessellate_degrees (float or None, default=1.0) – If provided, geometries will be tessellated to this resolution prior to wrapping.

Returns:

A geopandas.GeoDataFrame object containing the reconstructed unclassified features geometries. The geometry column name is “geometry”.

Return type:

geopandas.GeoDataFrame

property misc_transforms

Deprecated! DO NOT USE.

other

A list of miscellaneous topological plate boundary sections, which are not subduction zones or mid-ocean ridges (ridge/transform). This can include features like unclassified features, extended continental crusts, continental rifts, faults, orogenic belts, fracture zones, inferred paleo boundaries, terrane boundaries and passive continental boundaries.

Type:

iterable/list of pygplates.Feature

plate_reconstruction

The PlateReconstruction object will be used to access a plate rotation_model and a set of topology_features which contains plate boundary features like trenches, ridges and transforms.

Type:

PlateReconstruction

plot_all_topological_sections(ax, color='black', plot_subduction_teeth=False, ridge_kwargs=None, transform_kwargs=None, trench_kwargs=None, other_kwargs=None, **kwargs)[source]

Plot the reconstructed topological boundary sections(polylines) on a map.

This function draws gap-free topological plate boundaries by layering the topological sections in the following order:

  1. Miscellaneous topological boundary sections that are neither subduction zones nor mid-ocean ridges

  2. Ridges (gpml:MidOceanRidge)

  3. Transforms (gpml:Transform)

  4. Trenches (gpml:SubductionZone)

  5. Optional subduction teeth when plot_subduction_teeth=True

Parameters:
  • ax – Cartopy GeoAxes or PyGMT Figure object to plot on.

  • color (str or list, default="black") – Default colour used for any layer that does not specify its own color or edgecolor.

  • plot_subduction_teeth (bool, default=False) – If True, also plot subduction teeth using the trench layer styling.

  • ridge_kwargs (dict or None, optional) – Layer-specific keyword arguments forwarded to the corresponding plotting call. If a layer-specific dict provides color or edgecolor, it overrides the shared color argument for that layer. Keys in these dictionaries override keys passed through **kwargs.

  • transform_kwargs (dict or None, optional) – Layer-specific keyword arguments forwarded to the corresponding plotting call. If a layer-specific dict provides color or edgecolor, it overrides the shared color argument for that layer. Keys in these dictionaries override keys passed through **kwargs.

  • trench_kwargs (dict or None, optional) – Layer-specific keyword arguments forwarded to the corresponding plotting call. If a layer-specific dict provides color or edgecolor, it overrides the shared color argument for that layer. Keys in these dictionaries override keys passed through **kwargs.

  • other_kwargs (dict or None, optional) – Layer-specific keyword arguments forwarded to the corresponding plotting call. If a layer-specific dict provides color or edgecolor, it overrides the shared color argument for that layer. Keys in these dictionaries override keys passed through **kwargs.

  • **kwargs – Shared keyword arguments forwarded to each layer. Layer-specific dictionaries take precedence over overlapping keys in this shared set.

Returns:

The input axes/figure object, for convenience and chaining.

Return type:

ax

Examples

gplot.plot_all_topological_sections(
    ax,
    plot_subduction_teeth=True,
    other_kwargs={"color": "lightgrey", "linewidth": 0.8},
    ridge_kwargs={"color": "red", "linewidth": 1.0},
    transform_kwargs={"color": "green", "linewidth": 1.0},
    trench_kwargs={"color": "blue", "linewidth": 1.0},
)
plot_all_topologies(ax, color: str | list = 'black', **kwargs)[source]

Plot the reconstructed topological features listed below on a map.

  • pygplates.FeatureType.gpml_topological_network

  • pygplates.FeatureType.gpml_oceanic_crust

  • pygplates.FeatureType.gpml_topological_slab_boundary

  • pygplates.FeatureType.gpml_topological_closed_plate_boundary

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_coastlines(ax, color: str | list = 'black', **kwargs)[source]

Plot reconstructed coastlines on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_continent_ocean_boundaries(ax, color: str | list = 'black', **kwargs)[source]

Plot the reconstructed continent-ocean boundaries (COBs) on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_continental_crusts(ax, color='black', **kwargs)[source]

Plot continental crust lines on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_continental_rifts(ax, color='black', **kwargs)[source]

Plot continental rifts on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_continents(ax, color='black', **kwargs)[source]

Plot the reconstructed continental polygons on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_extended_continental_crusts(ax, color='black', **kwargs)[source]

Plot extended continental crust lines on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_faults(ax, color='black', **kwargs)[source]

Plot faults on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_feature(ax, feature, feature_name='', color: str | list = 'black', **kwargs)[source]

Plot pygplates.FeatureCollection or pygplates.Feature onto a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_fracture_zones(ax, color='black', **kwargs)[source]

Plot fracture zones on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

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

Plot a grid onto a map.

Parameters:
  • ax_or_fig – Cartopy ax or PyGMT figure object.

  • grid (NumPy MaskedArray, GPlately Raster or a time-dependent raster name.) – A MaskedArray with elements that define a grid. The number of rows in the raster corresponds to the number of latitudinal coordinates, while the number of raster columns corresponds to the number of longitudinal coordinates. Alternatively, a GPlately Raster object can be provided. If a raster name is provided, the raster will be looked up from the time-dependent rasters registered in the Plate Model Manager. The gplately.PlateReconstruction object must be created with a valid PlateModel object.

  • extent (tuple, default=(-180, 180, -90, 90)) – A tuple of 4 (min_lon, max_lon, min_lat, max_lat) representing the extent of gird.

Note

The parameters of this function are different for different plot engines. See CartopyPlotEngine.plot_grid() and PyGMTPlotEngine.plot_grid() for details.

plot_grid_from_netCDF(ax_or_fig, filename, var_name='', shading=None, shading_var_name='', **kwargs)[source]

Read raster data from a netCDF file and plot it on a map.

Parameters:
  • ax_or_fig – Cartopy ax or PyGMT figure.

  • filename (str) – Full path to a netCDF file.

  • var_name (str, default="") – The variable name of the raster data in the netCDF file. If not provided, the first variable in the netCDF file will be used.

  • shading (str, default=None) – Full path to a netCDF file containing illumination data, such as topography grid. If not provided, no shading will be applied. If you are using PyGMT plot engine, the valid shading parameters for PyGMT can also be used here, such as -I+d or "+a315+ne0.6".

  • shading_var_name (str, default="") – The variable name of the shading data in the shading netCDF file. If not provided, the first variable in the netCDF file will be used.

  • **kwargs – Keyword arguments for Matplotlib’s imshow() or PyGMT’s grdimage().

plot_inferred_paleo_boundaries(ax, color='black', **kwargs)[source]

Plot inferred paleo boundaries on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_misc_boundaries(ax, color='black', **kwargs)[source]

Plot the reconstructed miscellaneous plate boundary sections(polylines) on a map. Sections are neither subduction zones nor mid-ocean ridges, nor transforms.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_misc_transforms(ax, color='black', **kwargs)[source]

Deprecated! DO NOT USE.

plot_orogenic_belts(ax, color='black', **kwargs)[source]

Plot orogenic belts on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_passive_continental_boundaries(ax, color='black', **kwargs)[source]

Plot passive continental boundaries on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_plate_id(*args, **kwargs)[source]

Deprecated! DO NOT USE!

The function name plot_plate_id() is bad and should be changed. The new name is plot_plate_polygon_by_id(). For backward compatibility, we allow users to use the old name in their legcy code for now. No new code should call this function.

plot_plate_motion_vectors(ax_or_fig, color='black', lons=[], lats=[], spacingX=10, spacingY=10, normalise=False, delta_time=5.0, **kwargs)[source]

Calculate plate motion velocity vector fields at a particular geological time and plot them on a map.

Note

The plot_plate_motion_vectors() generates a MeshNode domain of point features using given spacings in the X and Y directions (spacingX and spacingY). Each point in the domain is assigned a plate ID, and these IDs are used to obtain equivalent stage rotations of identified tectonic plates over a 5 Ma time interval. Each point and its stage rotation are used to calculate plate velocities at a particular geological time. Velocities for each domain point are represented in the north-east-down coordinate system and plotted on a GeoAxes.

Vector fields can be optionally normalised by setting normalise to True. This makes vector arrow lengths uniform.

Parameters:
  • ax_or_fig – Cartopy ax or PyGMT figure.

  • color (str, default='black') – The colour of the velocity vectors. By default, it is set to black.

  • lons (list of float, default=[]) – A list of longitudes for the velocity domain point features. If not provided, a global mesh grid of points will be generated with the given spacings in the X and Y directions (spacingX and spacingY).

  • lats (list of float, default=[]) – A list of latitudes for the velocity domain point features. If not provided, a global mesh grid of points will be generated with the given spacings in the X and Y directions (spacingX and spacingY).

  • spacingX (int, default=10) – The spacing in the X direction used to make the velocity domain point feature mesh.

  • spacingY (int, default=10) – The spacing in the Y direction used to make the velocity domain point feature mesh.

  • normalise (bool, default=False) – Choose whether to normalise the velocity magnitudes so that vector lengths are all equal.

  • delta_time (float, default=5.0) – The time interval (in Ma) used to calculate the velocity vectors. The stage rotation between the current time and the time interval is used to calculate the velocity vectors. By default, it is set to 5 Ma.

  • **kwargs – Keyword arguments for Matplotlib quiver() or PyGMT velo().

plot_plate_polygon_by_id(ax_or_fig, plate_id, color='black', **kwargs)[source]

Plot a plate polygon with the given plate_id on a map.

Parameters:
  • ax_or_fig – Cartopy ax or PyGMT figure object.

  • plate_id (int) – A plate ID that identifies the continental polygon to plot. See the Global EarthByte plate IDs list for a full list of plate IDs.

  • **kwargs – Keyword arguments for plotting.

plot_pole(ax_or_fig, lon, lat, a95, color='green', **kwargs)[source]

Plot a paleomagnetic pole onto a map.

Parameters:
  • ax_or_fig – Matplotlib axes or PyGMT figure.

  • lon (float) – Longitudinal coordinate of the pole.

  • lat (float) – Latitudinal coordinate of the pole.

  • a95 (float) – The radius(in degrees) of the cone of 95% confidence around a paleomagnetic pole.

Return type:

Matplotlib axes or PyGMT figure.

plot_ridges(ax, color='black', **kwargs)[source]

Plot the reconstructed mid-ocean ridge lines(gpml:MidOceanRidge) on a map.

Note

This function only plots the reconstructed ridges as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_ridges_and_transforms(ax, color='black', **kwargs)[source]

Deprecated! DO NOT USE!

plot_slab_edges(ax, color='black', **kwargs)[source]

Plot slab edges on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_subduction_teeth(ax, spacing=0.07, size=None, aspect=None, color='black', **kwargs) None[source]

Plot subduction teeth.

Note

Subduction teeth are tessellated from PlotTopologies.trench_left and PlotTopologies.trench_right attributes, and transformed into Shapely polygons for plotting.

Parameters:
  • ax – Cartopy ax or pygmt figure object.

  • spacing (float, default=0.07) – The tessellation threshold (in radians). Parametrises subduction tooth density. Triangles are generated only along line segments with distances that exceed the given threshold spacing.

  • size (float, default=None) – Length of teeth triangle base (in radians). If kept at None, then size = 0.5*spacing.

  • aspect (float, default=None) – Aspect ratio of teeth triangles. If kept at None, then aspect = 2/3*size.

  • color (str, default='black') – The colour of the teeth. By default, it is set to black.

  • **kwargs – Keyword arguments for plotting subduction teeth. See Matplotlib keyword arguments here.

plot_sutures(ax, color='black', **kwargs)[source]

Plot sutures on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_terrane_boundaries(ax, color='black', **kwargs)[source]

Plot terrane boundaries on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_topological_plate_boundaries(ax, color='black', **kwargs)[source]

Plot the topological plate boundaries(polygons).

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_transforms(ax, color='black', **kwargs)[source]

Plot transform boundaries(gpml:Transform) on a map.

Note

This function only plots the reconstructed transforms as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_transitional_crusts(ax, color='black', **kwargs)[source]

Plot transitional crust on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_trenches(ax, color='black', **kwargs)[source]

Plot the reconstructed trenches on a map.

Note

This function only plots the reconstructed trenches as polylines. If you need to plot gap-free topological plate boundaries, see plot_all_topological_sections(), which allows you to plot all topological sections with different styles.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

plot_unclassified_features(ax, color='black', **kwargs)[source]

Plot GPML unclassified features on a map.

Parameters:
  • ax – Cartopy ax or pygmt figure object

  • color (str, default='black') – The edge colour of the geometries.

  • **kwargsMatplotlib keyword arguments or pygmt arguments

property ridge_transforms

Deprecated! DO NOT USE!

property ridges

Mid-ocean ridge features (all the features which are labelled as gpml:MidOceanRidge in the model). A list containing ridge and transform boundary sections of type pygplates.FeatureType.gpml_mid_ocean_ridge.

Type:

iterable/list of pygplates.Feature

property time

The time (Ma) to reconstruct and plot geological features to.

Type:

float

Note

You can either set the time attribute when creating the PlotTopologies object or anytime afterwards.

1# set the reconstruction time when creating the PlotTopologies object.
2gplot = gplately.PlotTopologies(..., time=100,...)
3
4# set the reconstruction time after PlotTopologies object is created.
5gplot.time = 100
property topological_plate_boundaries

Resolved topologies for rigid boundaries ONLY.

property topologies

Resolved topologies for BOTH rigid boundaries and networks. A list containing assorted topologies like:

  • pygplates.FeatureType.gpml_topological_network

  • pygplates.FeatureType.gpml_oceanic_crust

  • pygplates.FeatureType.gpml_topological_slab_boundary

  • pygplates.FeatureType.gpml_topological_closed_plate_boundary

Type:

iterable/list of pygplates.Feature

property transforms

Transform boundary features (all the features which are labelled as gpml:Transform in the model). A list containing transform boundary sections of type pygplates.FeatureType.gpml_transforms.

Type:

iterable/list of pygplates.Feature

trench_left

A list of pygplates.FeatureType.gpml_subduction_zone features whose subduction polarity is “left”.

Type:

iterable/list of pygplates.Feature

trench_right

A list of pygplates.FeatureType.gpml_subduction_zone features whose subduction polarity is “right”.

Type:

iterable/list of pygplates.Feature

trenches

A list of pygplates.FeatureType.gpml_subduction_zone features regardless of their subduction polarity. Normally, this list equals trench_left + trench_right but it can be different if there are some trench features with undefined subduction polarity in the model.

Type:

iterable/list of pygplates.Feature