Plotting

The following special plot functions are available and basically delegate to the plotting routines from ExtendableFEM/GridVisualize.

ExtendableASGFEM.plot_basisMethod
plot_basis(
    ONB::ONBasis{T, OBT, npoly, nquad};
    Plotter,
    resolution,
    kwargs...
)

plots the basis functions of the ONBasis ONB via GridVisualize. The Plotter argument determines the backend (e.g. GLMakie, CairoMakie, PyPlot, Plots).

source
ExtendableASGFEM.plot_modesMethod
plot_modes(
    sol::SGFEVector;
    unknown,
    Plotter,
    nmodes,
    ncols,
    width,
    sort
) -> GridVisualize.GridVisualizer

Plot scalar plots of the stochastic modes of an SGFEVector solution using ExtendableFEM.plots.GridVisualize.

Arguments

  • sol::SGFEVector: The stochastic Galerkin finite element solution vector whose modes are to be visualized.
  • unknown: (Optional, default: 1) Index of the unknown to plot (for multi-unknown systems).
  • Plotter: (Optional) Plotting backend to use (e.g., GLMakie, CairoMakie, PyPlot, Plots).
  • nmodes: (Optional) Number of stochastic modes to plot (default: all modes in the tensorized basis).
  • ncols: (Optional, default: 3) Number of columns in the plot grid.
  • width: (Optional) Total width of the plot grid in pixels (default: 400 * ncols).
  • sort: (Optional, default: false) If true, modes are sorted by their L2 norm (largest first).

Example

plot_modes(sol; Plotter=GLMakie, ncols=4, sort=true)
source