obspy.imaging.maps.plot_basemap¶
- plot_basemap(lons, lats, size, color, labels=None, projection='global', resolution='l', continent_fill_color='0.8', water_fill_color='1.0', colormap=None, colorbar=None, marker='o', title=None, colorbar_ticklabel_format=None, show=True, fig=None, **kwargs)[source]¶
Creates a basemap 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.)
- "ortho" (Will center around the mean lat/long.)
- "local" (Will plot around local events)
Defaults to “global”.
- resolution (str, optional)
Resolution of the boundary database to use. Will be based directly to the basemap module. Possible values are:
- "c" (crude)
- "l" (low)
- "i" (intermediate)
- "h" (high)
- "f" (full)
Defaults to "l". For compatibility, you may also specify any of the Cartopy resolutions defined in plot_cartopy().
- 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.
- fig (matplotlib.figure.Figure) Figure instance to reuse, returned from a previous plot_basemap() call. If a previous basemap plot is reused, any kwargs regarding the basemap plot setup will be ignored (i.e. projection, resolution, continent_fill_color, water_fill_color). Note that multiple plots using colorbars likely are problematic, but e.g. one station plot (without colorbar) and one event plot (with colorbar) together should work well.