plots.plot_in_space#

seismostats.plots.plot_in_space(longitudes: ndarray, latitudes: ndarray, magnitudes: ndarray, ax: GeoAxes | None = None, resolution: str = '10m', include_map: bool | None = False, country: str | None = None, style: str = 'satellite', dot_smallest: int = 10, dot_largest: int = 200, dot_interpolation_power: int = 2, dot_labels: str = 'auto', color_dots: str | ndarray = 'blue', cmap: str = 'viridis', color_map: str | None = None) GeoAxes#

This function plots seismicity on a surface. If include_map is set to True, a nice natural earth map is used, otherwise the seismicity is just plotted on a blank grid. In the latter case, the grid is stretched according to the midpoint latitude.

Parameters:
  • longitudes – Array of longitudes.

  • latitudes – Array of latitudes.

  • magnitudes – Array of magnitudes, used for scaling of dot sizes.

  • ax – GeoAxis object, if None is chosen, a new one will be created.

  • resolution – Resolution of the map, “10m”, “50m” and “110m” available.

  • include_map – If True, seismicity will be plotted on natural earth map, otherwise it will be plotted on a blank grid.

  • country – Name of country, if None map will fit to data points.

  • style – Style of map, “satellite” or “street” are available.

  • dot_smallest – Smallest dot size for magnitude scaling.

  • dot_largest – Largest dot size for magnitude scaling.

  • dot_interpolation_power – Interpolation power for scaling.

  • dot_labels – Determines how labels for magnitudes can be created. Input for matplotlib’s PathCollection.legend_elements. If None, no label is shown. If an integer, target to use dot_labels elements in the normed range. If “auto”, an automatic range is chosen for the labels (default). If a list, uses elements of list which are between minimum and maximum magnitude of dataset for the legend. Finally, a ~.ticker.Locator can be provided to use a predefined matplotlib.ticker (e.g. FixedLocator, which results in the same legend as providing a list of values).

  • color_dots – Color of the dots representing the events. If None is chosen, it will be set to “blue”.

  • cmap – Colormap for the dots, in case the color of the dots is an array. As default it will be set to “viridis”.

  • color_map – Color of background. If None is chosen, it will be either white or standard natural earth colors.

Returns:

ax – GeoAxis object