fluiddyn.output.figsļƒ

Utilities for creating figures (fluiddyn.output.figs)ļƒ

Provides

class fluiddyn.output.figs.Figure(size_axe=None, name_file=None, figures=None, **kwargs)[source]ļƒ

Bases: Figure

One figure.

Improvement (?) of matplotlib.figure.Figure

Parameters:
size_axelist, optional

Size of the axe.

name_filestr, optional

Name of the file.

figuresfluiddyn.output.figs.Figures

Set of figures.

kwargskeyword arguments

Given when create the figure.

set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, canvas=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, constrained_layout=<UNSET>, constrained_layout_pads=<UNSET>, dpi=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, figheight=<UNSET>, figwidth=<UNSET>, frameon=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, layout_engine=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, size_inches=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, tight_layout=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)ļƒ

Set multiple properties at once.

Supported properties are

Properties:

agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image alpha: scalar or None animated: bool canvas: FigureCanvas clip_box: ~matplotlib.transforms.BboxBase or None clip_on: bool clip_path: Patch or (Path, Transform) or None constrained_layout: unknown constrained_layout_pads: unknown dpi: float edgecolor: color facecolor: color figheight: float figure: ~matplotlib.figure.Figure figwidth: float frameon: bool gid: str in_layout: bool label: object layout_engine: {ā€˜constrainedā€™, ā€˜compressedā€™, ā€˜tightā€™, ā€˜noneā€™, .LayoutEngine, None} linewidth: number mouseover: bool path_effects: list of .AbstractPathEffect picker: None or bool or float or callable rasterized: bool size_inches: (float, float) or float sketch_params: (scale: float, length: float, randomness: float) snap: bool or None tight_layout: unknown transform: ~matplotlib.transforms.Transform url: str visible: bool zorder: float

saveifhasto(name_file=None, hastosave=None, verbose=True)[source]ļƒ

Save the figure if hastosave is True.

Parameters:
name_filestr, optional

Name of the file (the extension has to indicate the format).

hastosavebool, optional

If True, save the figure.

verbose{True, bool}, optional

Print nothing if False.

class fluiddyn.output.figs.Figures(path_save=None, hastosave=False, for_beamer=False, for_article=False, fontsize=18, fontsize_pad=9)[source]ļƒ

Bases: object

Represent a set of figures.

Utilities to plot and save figures with matplotlib.

Parameters:
path_savestr

Related to the path where to save.

hastosavebool

If True, the function Figure.saveifhasto save the figure.

for_beamerbool

If True, use beamer layout.

for_articlebool

If True, use article layout.

fontsize{18, int}

Font size of the text in the figures.

fontsize_pad{9, int}

Font size of the pad in the figures.

new_figure(name_file=None, num=None, fig_width_mm=200, fig_height_mm=150, size_axe=None)[source]ļƒ

Create a new Figure object and return it.

Parameters:
numint, optional

Number.

fig_width_mm{200, number}, optional

Width (in mm)

fig_height_mm{150, number}, optional

Height (in mm)

size_axelist, optional

Size of the axe.

name_filestr, optional

Name of the file.

Functions

show([block])

Show slightly more cleaver than old version of plt.show.

Classes

Figure([size_axe,Ā name_file,Ā figures])

One figure.

Figures([path_save,Ā hastosave,Ā for_beamer,Ā ...])

Represent a set of figures.