A class for creating plots from a grid object on top of a Basemap.
Parameters : | grid : Grid
debug : bool
|
---|
Attributes
grid | (Grid) Grid object. |
debug | (bool) True to print debugging messages, False to supressed them. |
proj | (Proj) Object for perforning cartographic transformations specific to the grid. |
grid_lons | (array) Grid longitudes in degrees. |
grid_lats | (array) Grid latitudes in degress. |
basemap | (Basemap) Last plotted basemap, None when no basemap has been plotted. |
mappables | (list) List of ContourSet, etc. which have been plotted, useful when adding colorbars. |
fields | (list) List of fields which have been plotted. |
Methods
plot_basemap([lat_lines, lon_lines, ...]) | Plot a basemap. |
plot_colorbar([mappable, orientation, ...]) | Plot a colorbar to an axis. |
plot_crosshairs([lon, lat, line_style, ...]) | Plot crosshairs at a given longitude and latitude. |
plot_grid(field[, level, vmin, vmax]) | Plot the grid onto the current basemap. |
plot_latitude_slice(field[, lon, lat, vmin, ...]) | Plot a slice along a given latitude. |
plot_longitude_slice(field[, lon, lat, ...]) | Plot a slice along a given longitude. |
Private methods
__init__(grid[, debug]) | initalize the object. |
_check_basemap() | Check that basemap is not None, raise ValueError if it is. |
_find_nearest_grid_indices(lon, lat) | Find the nearest x, y grid indices for a given latitude and longitude. |
_parse_ax(ax) | Parse the ax parameter. |
_parse_lon_lat(lon, lat) | Parse lat and lon parameters |
_parse_vmin_vmax(field, vmin, vmax) | Parse vmin and vmax parameters. |