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: matplotlib.figure.Figure

One figure.

Improvement (?) of matplotlib.figure.Figure

Parameters
(for the __init__ method)
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.

saveifhasto(self, 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(self, 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.