monet.plots package¶
Submodules¶
monet.plots.colorbars module¶
colorbar helper functions
-
monet.plots.colorbars.cmap_discretize(cmap, N)¶ Return a discrete colormap from the continuous colormap cmap.
cmap: colormap instance, eg. cm.jet. N: number of colors.
- Example
- x = resize(arange(100), (5,100)) djet = cmap_discretize(cm.jet, 5) imshow(x, cmap=djet)
-
monet.plots.colorbars.colorbar_index(ncolors, cmap, minval=None, maxval=None, dtype='int', basemap=None)¶
monet.plots.mapgen module¶
map utilities
-
monet.plots.mapgen.draw_map(crs=None, natural_earth=False, coastlines=True, states=False, countries=True, resolution='10m', extent=None, figsize=(10, 5), return_fig=False, **kwargs)¶ Short summary.
Parameters: - ax (type) – Description of parameter ax (the default is None).
- natural_earth (bool) – Description of parameter natural_earth (the default is True).
- coastlines (bool) – Description of parameter coastlines (the default is True).
- states (bool) – Description of parameter states (the default is True).
- countries (bool) – Description of parameter countries (the default is True).
- state_resolutions (bool) – Description of parameter state_resolutions (the default is ‘10m’).
- extent ([lon_min,lon_max,lat_min,lat_max]) – Description of parameter extent (the default is None).
Returns: Description of returned object.
Return type: type
monet.plots.plots module¶
plotting routines
-
monet.plots.plots.kdeplot(df, title=None, label=None, ax=None, **kwargs)¶ Short summary.
Parameters: - df (type) – Description of parameter df.
- col (type) – Description of parameter col (the default is ‘obs’).
- title (type) – Description of parameter title (the default is None).
- label (type) – Description of parameter label (the default is None).
- ax (type) – Description of parameter ax (the default is ax).
- **kwargs (type) – Description of parameter **kwargs.
Returns: Description of returned object.
Return type: type
-
monet.plots.plots.make_spatial_contours(modelvar, gridobj, date, m, dpi=None, savename='', discrete=True, ncolors=None, dtype='int', **kwargs)¶
-
monet.plots.plots.make_spatial_plot(modelvar, m, dpi=None, plotargs={}, ncolors=15, discrete=False)¶
-
monet.plots.plots.normval(vmin, vmax, cmap)¶
-
monet.plots.plots.scatter(df, x=None, y=None, title=None, label=None, ax=None, **kwargs)¶ Short summary.
Parameters: - df (type) – Description of parameter df.
- x (type) – Description of parameter x (the default is ‘obs’).
- y (type) – Description of parameter y (the default is ‘model’).
- **kwargs (type) – Description of parameter **kwargs.
Returns: Description of returned object.
Return type: type
-
monet.plots.plots.spatial(modelvar, **kwargs)¶
-
monet.plots.plots.spatial_bias_scatter(df, m, date, vmin=None, vmax=None, savename='', ncolors=15, fact=1.5, cmap='RdBu_r')¶
-
monet.plots.plots.taylordiagram(df, marker='o', col1='obs', col2='model', label1='OBS', label2='MODEL', scale=1.5, addon=False, dia=None)¶
-
monet.plots.plots.timeseries(df, x='time', y='obs', ax=None, plotargs={}, fillargs={'alpha': 0.2}, title='', ylabel=None, label=None)¶ Short summary.
Parameters: - df (type) – Description of parameter df.
- col (type) – Description of parameter col (the default is ‘Obs’).
- ax (type) – Description of parameter ax (the default is None).
- sample (type) – Description of parameter sample (the default is ‘H’).
- plotargs (type) – Description of parameter plotargs (the default is {}).
- fillargs (type) – Description of parameter fillargs (the default is {}).
- title (type) – Description of parameter title (the default is ‘’).
- label (type) – Description of parameter label (the default is None).
Returns: Description of returned object.
Return type: type
-
monet.plots.plots.wind_barbs(ws, wdir, gridobj, m, **kwargs)¶
-
monet.plots.plots.wind_quiver(ws, wdir, gridobj, m, **kwargs)¶
monet.plots.taylordiagram module¶
Taylor diagram (Taylor, 2001) test implementation. http://www-pcmdi.llnl.gov/about/staff/Taylor/CV/Taylor_diagram_primer.htm
-
class
monet.plots.taylordiagram.TaylorDiagram(refstd, scale=1.5, fig=None, rect=111, label='_')¶ Bases:
objectTaylor diagram: plot model standard deviation and correlation to reference (data) sample in a single-quadrant polar plot, with r=stddev and theta=arccos(correlation).
-
add_contours(levels=5, **kwargs)¶ Add constant centered RMS difference contours.
-
add_sample(stddev, corrcoef, *args, **kwargs)¶ Add sample (stddev,corrcoeff) to the Taylor diagram. args and kwargs are directly propagated to the Figure.plot command.
-