monet.plots

Functions

savefig(fname, *[, loc, decorate, logo, ...])

Save figure and add logo.

sp_scatter_bias(df[, col1, col2, ax, ...])

monet.plots.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.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.savefig(fname, *, loc=1, decorate=True, logo=None, logo_height=None, **kwargs)

Save figure and add logo.

Parameters
  • fname (str) – Output file name or path. Passed to plt.savefig. Must include desired file extension (.jpg or .png).

  • loc (int) – The location for the logo.

    • 1 – bottom left (default)

    • 2 – bottom right

    • 3 – top right

    • 4 – top left

  • decorate (bool, default: True) – Whether to add the logo.

  • logo (str, optional) – Path to the logo to be used. If not provided, the MONET logo is used.

  • logo_height (float or int, optional) – Desired logo height in pixels. If not provided, the original logo image dimensions are used. Modify to scale the logo.

  • **kwargs (dict) – Passed to the plt.savefig function.

Return type

None

monet.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.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

Modules

monet.plots.colorbars

Colorbar helper functions

monet.plots.mapgen

Map utilities.

monet.plots.plots

plotting routines

monet.plots.taylordiagram(df[, marker, ...])