obspy.core.event.Catalog.plot¶
- Catalog.plot(*args, **kwargs)[source]¶
Creates preview map of all events in current Catalog object.
Parameters: - 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"
- 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".
- label (str, optional)
Events will be labelled based on the chosen property. Possible values are:
- "magnitude"
- None
Defaults to "magnitude"
- color (str, optional)
The events will be color-coded based on the chosen property. Possible values are:
- "date"
- "depth"
Defaults to "depth"
- colormap (str, any matplotlib colormap, optional) The colormap for color-coding the events. The event with the smallest property will have the color of one end of the colormap and the event with the biggest property the color of the other end with all other events in between. Defaults to None which will use the default colormap for the date encoding and a colormap going from green over yellow to red for the depth encoding.
- show (bool) Whether to show the figure after plotting or not. Can be used to do further customization of the plot before showing it.
- outfile (str) Output file path to directly save the resulting image (e.g. "/tmp/image.png"). Overrides the show option, image will not be displayed interactively. The given path/filename is also used to automatically determine the output format. Supported file formats depend on your matplotlib backend. Most backends support png, pdf, ps, eps and svg. Defaults to None.
Examples
Mollweide projection for global overview:
>>> cat = readEvents() >>> cat.plot()
(Source code, png, hires.png)
Orthographic projection:
>>> cat.plot(projection="ortho")
(Source code, png, hires.png)
Local (Albers equal area) projection:
>>> cat.plot(projection="local")
(Source code, png, hires.png)
- projection (str, optional)