pymor.discretizers.builtin.gui.jupyter.kthreed¶
Classes
K3D plot of scalar data associated to a two-dimensional |
Functions
Generate a k3d Plot for scalar data associated to a two-dimensional |
- class pymor.discretizers.builtin.gui.jupyter.kthreed.VectorArrayPlot(*args: t.Any, **kwargs: t.Any)[source]¶
Bases:
PlotK3D plot of scalar data associated to a two-dimensional
Grid.Used by
visualize_k3d.Methods
- pymor.discretizers.builtin.gui.jupyter.kthreed.visualize_k3d(grid, U, bounding_box=None, codim=2, title=None, legend=None, separate_colorbars=False, rescale_colorbars=False, columns=2, warp_by_scalar=True, scale_factor='auto', show_mesh=True, height=300, color_map=<matplotlib.colors.ListedColormap object>, background_color=16773836, return_widget=True)[source]¶
Generate a k3d Plot for scalar data associated to a two-dimensional
Grid.The grid’s
ReferenceElementmust 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 –
VectorArrayof the data to visualize. Iflen(U) > 1, the data is visualized as a time series of plots. Alternatively, a tuple ofVectorArrayscan 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.
codim – The codimension of the entities the data in
Uis attached to (either 0 or 2).title – Title of the plot.
legend – Description of the data that is plotted. Most useful if
Uis a tuple in which caselegendhas 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.
warp_by_scalar – If
True, visualize as a surface where the z-coordinate is determined byU.scale_factor – If
warp_by_scalaris enabled, the factor by which the values inUare scaled to obtain the z-coordinate. If set to'auto', the scale factor is determined from the minimum/maximum values inUand thebounding_box.show_mesh – If
Trueandwarp_by_scalaris enabled, additionally visualize the mesh in the (z=0)-plane.height – Height of the subplots in pixels.
color_map – Matplotlib
Colormapobject or a K3D array((step, r, g, b)).background_color – Background color of the plot.
Defaults
warp_by_scalar, scale_factor, background_color (see
pymor.core.defaults)