pymor.discretizers.builtin.gui.jupyter.matplotlib
¶
Module Contents¶
- class pymor.discretizers.builtin.gui.jupyter.matplotlib.MPLPlotBase(U, grid, codim, legend, bounding_box=None, separate_colorbars=False, columns=2, separate_plots=False, separate_axes=False)[source]¶
- pymor.discretizers.builtin.gui.jupyter.matplotlib.visualize_matplotlib_1d(grid, U, codim=1, title=None, legend=None, separate_plots=True, separate_axes=False, columns=2)[source]¶
Visualize scalar data associated to a one-dimensional
Grid
as a plot.The grid’s
ReferenceElement
must be the line. The data can either be attached to the subintervals or vertices of the grid.Parameters
- grid
The underlying
Grid
.- U
VectorArray
of the data to visualize. Iflen(U) > 1
, the data is visualized as an animation in a single axes object or a series of axes, depending on theseparate_axes
switch. It is also possible to provide a tuple ofVectorArrays
, in which case several plots are made into one or multiple figures, depending on theseparate_plots
switch. The lengths of all arrays have to agree.- codim
The codimension of the entities the data in
U
is attached to (either 0 or 1).- title
Title of the plot.
- legend
Description of the data that is plotted. Most useful if
U
is a tuple in which caselegend
has to be a tuple of strings of the same length.- separate_plots
If
True
, use multiple figures to visualize multipleVectorArrays
.- separate_axes
If
True
, use separate axes for each figure instead of an Animation.- column
Number of columns the subplots are organized in.
- pymor.discretizers.builtin.gui.jupyter.matplotlib.visualize_patch(grid, U, bounding_box=None, codim=2, title=None, legend=None, separate_colorbars=False, rescale_colorbars=False, columns=2)[source]¶
Visualize scalar data associated to a two-dimensional
Grid
as a patch plot.The grid’s
ReferenceElement
must be the triangle or square. The data can either be attached to the faces or vertices of the grid.Parameters
- grid
The underlying
Grid
.- U
VectorArray
of the data to visualize. Iflen(U) > 1
, the data is visualized as a time series of plots. Alternatively, a tuple ofVectorArrays
can be provided, in which case a subplot is created for each entry of the tuple. The lengths of all arrays have to agree.- bounding_box
A bounding box in which the grid is contained (defaults to grid.bounding_box()).
- codim
The codimension of the entities the data in
U
is attached to (either 0 or 2).- title
Title of the plot.
- legend
Description of the data that is plotted. Most useful if
U
is a tuple in which caselegend
has to be a tuple of strings of the same length.- separate_colorbars
If
True
, use separate colorbars for each subplot.- rescale_colorbars
If
True
, rescale colorbars to data in each frame.- columns
The number of columns in the visualizer GUI in case multiple plots are displayed at the same time.