finesse.plotting.style package

Module contents

finesse.plotting.style.context(style, after_reset=False)[source]

Sets matplotlib.pyplot parameters to use the given style type within the current context.

See list_styles() for a list of all available styles.

Parameters

stylestr

Name of the style to use.

after_resetbool

If True, apply style after resetting settings to their defaults; otherwise, apply style on top of the current settings.

Examples

To use the default.mplstyle style-sheet temporarily, use the with statement as so:

import finesse.plotting as fplt
with fplt.context('default'):
    ...
finesse.plotting.style.get_style_path(style)[source]

Returns the path to each style passed as an argument.

Parameters

stylestr or list of str

The style(s) to get the paths of

Returns

list of str

A list containing the paths of all requested styles.

finesse.plotting.style.list_styles()[source]

Lists all the styles (.mplstyle files) available to use.

Returns

list

A list containing the names of all available styles.

finesse.plotting.style.use(style)[source]

Sets matplotlib.pyplot parameters to use the given style type.

See list_styles() for a list of all available styles.

Parameters

stylestr

Name of the style to use.

Examples

To set-up your plots to use the default.mplstyle style-sheet, simply write:

import finesse.plotting as fplt
fplt.use('default')