visualdynamics.gui.windows¶
windows
¶
A pane in a window of its own.
geometry.plot() from a script opens the same 3-D view the app shows,
with the same bar over it, so the labeled axes and the orientation triad
are toggles instead of arguments to know about in advance. Each pane
owns its controls, so the window and a one-line script show the same
thing.
Nothing here is imported unless a plot is shown on screen. Rendering to a file does not use this module, so a headless run never builds a widget.
Functions:
| Name | Description |
|---|---|
scene_window |
Draw into a ScenePane of its own and show it on screen. |
data_window |
Draw into a DataPane of its own and show it on screen. |
Classes¶
Functions:¶
scene_window
¶
scene_window(draw: Callable[[Any], Any], *, theme: Any = None, title: str | None = None, axis_unit: str = '', size: tuple[int, int] = (1000, 700), show: bool = True, view: Any = None) -> ScenePane
Draw into a ScenePane of its own and show it on screen.
draw(plotter) adds whatever is being shown. axis_unit is the unit
the labeled axes show; the pane needs it to label them again when
the bar's toggles change. view is the geometry's View the window
opens on and Reset View returns to. Without one (a MAC's bars, a
waterfall), the camera keeps the direction draw gave it and is
fitted to the scene. With
show and no event loop already running, this runs the event loop
and returns when the window is closed. Returns the pane; its
.plotter is the PyVista plotter. Raises RuntimeError, saying what
is missing, on a machine that cannot draw a 3-D view.
Source code in src/visualdynamics/gui/windows.py
data_window
¶
data_window(draw: Callable[[Any], Any], *, theme: Any = None, title: str | None = None, complex_data: bool = False, size: tuple[int, int] = (1000, 700), on_pane: Callable[[DataPane], Any] | None = None, show: bool = True) -> DataPane
Draw into a DataPane of its own and show it on screen.
draw(graphics) builds the plot. With complex_data the component
box is shown, and choosing a component redraws the plot, the same
control the app shows over an FRF. The rest of the app's bar is left
out because none of it applies here: filtering to drive points is a
record selection, and Edit Fit opens a fitting session.
on_pane is called with the pane before anything is drawn, so a
caller whose drawing depends on a control (which component to plot)
can read it on the first pass as well as on every redraw. show
behaves as in scene_window. Returns the pane.