API Reference#

fenicsx_plotly.plot(obj, colorscale: str = 'inferno', wireframe: bool = True, scatter: bool = False, size: int = 10, name: str = 'f', color: str = 'gray', opacity: float = 1.0, show_grid: bool = False, size_frame: Optional[Tuple[int, int]] = None, background: Tuple[int, int, int] = (242, 242, 242), normalize: bool = False, component: Optional[str] = None, showscale: bool = True, show: bool = True, filename: Optional[str] = None, **kwargs) FEniCSPlotFig[source]#

Plot FEniCSx object

Parameters:
  • obj (Mesh, Function. FunctionSpace, MeshFunction, DirichletBC) – FEniCSx object to be plotted

  • colorscale (str, optional) – The colorscale, by default “inferno”

  • wireframe (bool, optional) – Whether you want to show the mesh in wireframe, by default True

  • scatter (bool, optional) – Plot function as scatter plot, by default False

  • size (int, optional) – Size of scatter points, by default 10

  • name (str, optional) – Name to show up in legend, by default “f”

  • color (str, optional) – Color to be plotted on the mesh, by default “gray”

  • opacity (float, optional) – opacity of surface, by default 1.0

  • show_grid (bool, optional) – Show x, y (and z) axis grid, by default False

  • size_frame ([type], optional) – Size of plot, by default None

  • background (tuple, optional) – Background of plot, by default (242, 242, 242)

  • normalize (bool, optional) – For vectors, normalize then to have unit length, by default False

  • component ([type], optional) – Plot a component ([“Magnitude”, “x”, “y”, “z”]) for vector, by default None

  • showscale (bool, optional) – Show colorbar, by default True

  • show (bool, optional) – Show figure, by default True

  • filename ([type], optional) – Path to file where you want to save the figure, by default None

Raises:

TypeError – If object to be plotted is not recognized.