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 — the labelled axes and the orientation triad
are toggles rather than arguments you have to know about beforehand.
That is the whole point of the panes owning their own controls: the
window and a one-line script put up the same thing.
Nothing here is imported unless a plot is actually shown. Rendering to a file never comes through here, so a headless run never builds a widget.
Functions:
| Name | Description |
|---|---|
scene_window |
Draw into a ScenePane of its own and put it on screen. |
data_window |
Draw into a DataPane of its own and put 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,
) -> ScenePane
Draw into a ScenePane of its own and put it on screen.
draw(plotter) adds whatever is being shown. axis_unit is what the
labelled axes say, which the pane needs to re-annotate when the bar's
toggles move. Returns the pane; its .plotter is the PyVista one.
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 put it on screen.
draw(graphics) builds the plot. With complex_data the component
box is offered, and choosing a part redraws — the same control the
app puts over an FRF. The rest of the app's bar is absent because it
is not a live option here: filtering to drive points is a record
selection, and Edit Fit opens a fitting session.
on_pane is handed 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.