PlottingOptions#

class ansys.tools.visualization_interface.utils.plotting_options.PlottingOptions#

Structured representation of all plotting kwargs.

Calling from_kwargs() splits a raw **kwargs dictionary into:

  • Framework fields (name_filter, clipping_plane) — consumed by the visualization framework and not forwarded to the renderer.

  • extra — every remaining key, forwarded verbatim to the underlying rendering library (PyVista add_mesh, Plotly Figure.show, etc.).

Parameters:
name_filterstr, optional

Regular expression with the desired name or names to include in the plotter. Objects whose name does not match the expression are skipped.

clipping_planeClipPlane, optional

Plane used to clip the mesh before adding it to the scene.

extradict

Renderer-specific options forwarded verbatim to the underlying library.

Overview#

from_kwargs

Parse and consume all keys from kwargs.

Import detail#

from ansys.tools.visualization_interface.utils.plotting_options import PlottingOptions

Attribute detail#

PlottingOptions.name_filter: str | None = None#
PlottingOptions.clipping_plane: ansys.tools.visualization_interface.utils.clip_plane.ClipPlane | None = None#
PlottingOptions.extra: Dict[str, Any]#

Method detail#

classmethod PlottingOptions.from_kwargs(kwargs: Dict) PlottingOptions#

Parse and consume all keys from kwargs.

Framework-specific keys (matching dataclass fields other than extra) are mapped to their typed fields. All remaining keys are collected into extra. The supplied kwargs dictionary is cleared in-place so that callers can safely inspect it afterwards and know it has been fully consumed.

Parameters:
kwargsdict

Mutable keyword-argument dictionary to parse. All keys are removed in-place.

Returns:
PlottingOptions

Instance populated from kwargs.