csep.plots.plot_catalog
- csep.plots.plot_catalog(catalog, basemap=None, projection=None, extent=None, set_global=False, mag_ticks=None, size=15, max_size=300, power=3, min_val=None, max_val=None, plot_region=False, ax=None, show=False, **kwargs)[source]
Spatial plot of catalog epicenters. Can be plotted over a basemap if desired by passing the keyword parameters of the function
plot_basemap(). The size of the events is automatically scaled according to their magnitude. Fine-tuning of an exponential sizing function can be set with the parameterssize,max_size,power,min_valandmax_val.Usage Tutorials
- Parameters:
catalog (CSEPCatalog) – Catalog object to be plotted.
basemap (str, optional) – Passed to
plot_basemap()along with kwargs. Possible values are: ‘stock_img’, ‘google-satellite’, ‘ESRI_terrain’, ‘ESRI_imagery’, ‘ESRI_relief’, ‘ESRI_topo’, a custom web service link, or a GeoTiff filepath. Defaults to None.projection (cartopy.crs.Projection or str, optional) – Projection to be used in the underlying basemap. Can be a cartopy projection instance, or approx for a quick approximation of Mercator. Defaults to
PlateCarreeif None.extent (list of float, optional) – Defaults to 1.05 *
catalog.region.get_bbox(). Defaults to None.set_global (bool, optional) – Display the complete globe. Defaults to False.
mag_ticks (list of float or int, optional) – Ticks to display in the legend. Can be an array/list of magnitudes, or a number of bins to discretize the magnitude range. Defaults to None.
size (float, optional) – Size of the minimum magnitude event. Defaults to 15.
max_size (float, optional) – Size of the maximum magnitude event. Defaults to 300.
power (float, optional) – Power scaling of the scatter sizing. Defaults to 3.
min_val (float, optional) – Override minimum magnitude of the catalog for scatter sizing. Useful to plot multiple catalogs with different magnitude ranges. Defaults to None.
max_val (float, optional) – Override maximum magnitude of the catalog for scatter sizing. Useful to plot multiple catalogs with different magnitude ranges. Defaults to None.
plot_region (bool, optional) – Flag to plot the catalog region border. Defaults to False.
ax (matplotlib.axes.Axes, optional) – Previously defined ax object. Defaults to None.
show (bool, optional) – If True, displays the plot. Defaults to False.
**kwargs (optional) –
Additional keyword arguments to customize the plot:
alpha (float): Transparency level for the scatter points.
markercolor (str): Color for the scatter points.
markeredgecolor (str): Color for the edges of the scatter points.
figsize (tuple): The size of the figure.
legend (bool): Whether to display a legend. Defaults to True.
legend_title (str): Title for the legend.
legend_labelspacing (float): Spacing between labels in the legend.
legend_borderpad (float): Border padding for the legend.
legend_framealpha (float): Frame alpha for the legend.
region_color (str): Color for the region border.
title (str): Title of the plot.
title_fontsize (int): Font size of the plot title.
tight_layout (bool): Whether to use tight layout for the figure.
- Returns:
The Matplotlib axes object with the plotted data.
- Return type:
Changed in version 0.8.0: The plot_args dictionary is only partially supported and will be removed in v1.0.0. Changed region_border name to plot_region. Scaling the events size through mag_scale is no longer used.
Added in version 0.8.0: Added parameters size, max_size, power, min_val, max_val for fine-tuning of the events sizing.