obspy.imaging.maps.plot_cartopy

plot_cartopy(lons, lats, size, color, labels=None, projection='global', resolution='110m', continent_fill_color='0.8', water_fill_color='1.0', colormap=None, colorbar=None, marker='o', title=None, colorbar_ticklabel_format=None, show=True, proj_kwargs=None, **kwargs)[source]

Creates a Cartopy plot with a data point scatter plot.

Parameters:
  • lons (list/tuple of floats) Longitudes of the data points.
  • lats (list/tuple of floats) Latitudes of the data points.
  • size (float or list/tuple of floats) Size of the individual points in the scatter plot.
  • color (list/tuple of floats (or objects that can be converted to floats, like e.g. UTCDateTime)) Color information of the individual data points to be used in the specified color map (e.g. origin depths, origin times).
  • labels (list/tuple of str) Annotations for the individual data points.
  • projection (str, optional)

    The map projection. Currently supported are:

    • "global" (Will plot the whole world using Mollweide.)
    • "ortho" (Will center around the mean lat/long using Orthographic.)
    • "local" (Will plot around local events using AlbersEqualArea.)
    • Any other Cartopy Projection. An instance of this class will be created using the supplied proj_kwargs.

    Defaults to “global”

  • resolution (str, optional)

    Resolution of the boundary database to use. Will be passed directly to the Cartopy module. Possible values are:

    • "110m"
    • "50m"
    • "10m"

    Defaults to "110m". For compatibility, you may also specify any of the Basemap resolutions defined in plot_basemap().

  • continent_fill_color (Valid matplotlib color, optional) Color of the continents. Defaults to "0.9" which is a light gray.
  • water_fill_color (Valid matplotlib color, optional) Color of all water bodies. Defaults to "white".
  • colormap (str, any matplotlib colormap, optional) The colormap for color-coding the events as provided in color kwarg. The event with the smallest color property will have the color of one end of the colormap and the event with the highest color property the color of the other end with all other events in between. Defaults to None which will use the default matplotlib colormap.
  • colorbar (bool, optional) When left None, a colorbar is plotted if more than one object is plotted. Using True/False the colorbar can be forced on/off.
  • title (str) Title above plot.
  • colorbar_ticklabel_format (str or function or subclass of matplotlib.ticker.Formatter) Format string or Formatter used to format colorbar tick labels.
  • show (bool) Whether to show the figure after plotting or not. Can be used to do further customization of the plot before showing it.
  • proj_kwargs (dict) Keyword arguments to pass to the Cartopy Projection. In this dictionary, you may specify central_longitude='auto' or central_latitude='auto' to have this function calculate the latitude or longitude as it would for other projections. Some arguments may be ignored if you choose one of the built-in projection choices.