A plot with controls: a page whose panels respond to sliders, with no library to load. The panels are the plots of the library (a Figure or a Scene) drawn as usual; what changes when a control moves is what the Behaviors of their items say. Like every plot it is an immutable value, built by chaining:
Plot.filtration(points) // a complex, its diagram, a slider for the scale
.withPlay(10)
.withTitle("Noisy circle")
Interactive()
.withSlider("t", 0, 1)
.withPanel(Panel(figure).react(Mark.Points(...), Behavior.shownFrom("t", 0.3)))
The page is one HTML file, and Interactive.at gives the still picture at any value, so the same plot makes the frames of a video or the slides of a talk (frames, saveFrames).
'''Extending it.''' withScript(js) runs your JavaScript on the page with tda4j, the page's controller: tda4j.get(name), tda4j.set(name, value), tda4j.onChange(name, f), and tda4j.reactor(kind, f) to define what a Behavior.Custom of that kind does (f(item, behavior, value), item.el being the SVG element). Every change is also announced as a tda4j:change event on the page's root element, for anything else on the page.
Value parameters
- controls
-
the sliders, top to bottom
- panels
-
what is drawn, left to right and wrapping
- scripts
-
JavaScript to run on the page (see above)
- title
-
the page's heading
Attributes
- Companion
- object
- Experimental
- true
- Source
- Interactive.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Plotclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
tweak in every panel; a tweak a 3-D panel cannot have (an axis) leaves it as it is, and Labels(title = ...) titles the page, not the panels.
tweak in every panel; a tweak a 3-D panel cannot have (an axis) leaves it as it is, and Labels(title = ...) titles the page, not the panels.
Attributes
- Source
- Interactive.scala
The still picture with the controls at values (the others at their starting values): the same items, in the same places, as the page shows at those values.
The still picture with the controls at values (the others at their starting values): the same items, in the same places, as the page shows at those values.
Attributes
- Source
- Interactive.scala
The still picture with the sliders and selections as state has them: what the page shows after the viewer has done the same. Sliders it leaves out are at their starting values, selections at nothing chosen.
The still picture with the sliders and selections as state has them: what the page shows after the viewer has done the same. Sliders it leaves out are at their starting values, selections at nothing chosen.
Attributes
- Source
- Interactive.scala
The still picture with the control name at value.
The still picture with the first control at value.
The plot as a fragment to embed in a page (an ``, or a `
The plot as a fragment to embed in a page (an ``, or a `
` with its own script for 3-D).
Attributes
- Source
- Interactive.scala
count still pictures with the first control at even steps from its minimum to its maximum, for a video or a slide for each.
count still pictures with the first control at even steps from its minimum to its maximum, for a video or a slide for each.
Attributes
- Source
- Interactive.scala
A still picture for each of values of the first control.
A still picture at every stop of the first control: one for each change of the picture.
A still picture at every stop of the first control: one for each change of the picture.
Attributes
- Source
- Interactive.scala
A complete HTML page, following the reader's light or dark setting under Theme.Auto.
A complete HTML page, following the reader's light or dark setting under Theme.Auto.
Attributes
- Source
- Interactive.scala
figures applied to the 2-D panels and scenes to the 3-D ones.
Writes count frames (see frames) as frame-0000.svg, frame-0001.svg, ... in directory, in theme, and returns their paths. Files carry no background unless the style asks for one (withStyle("print")).
Writes count frames (see frames) as frame-0000.svg, frame-0001.svg, ... in directory, in theme, and returns their paths. Files carry no background unless the style asks for one (withStyle("print")).
Attributes
- Source
- Interactive.scala
saveFrames in the theme called theme (auto, light or dark), the paths as an array: for callers with a word and no Seq (MATLAB, Python).
saveFrames in the theme called theme (auto, light or dark), the paths as an array: for callers with a word and no Seq (MATLAB, Python).
Attributes
- Source
- Interactive.scala
saveFrames in the light theme, for callers that cannot use a default argument (Java, MATLAB).
saveFrames in the light theme, for callers that cannot use a default argument (Java, MATLAB).
Attributes
- Source
- Interactive.scala
The plot at its starting values, as one still picture.
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
- Source
- Interactive.scala
The keys of the selection selection that the rectangle window chooses on the 3-D panel number panel (counting every panel of the page from 0) with the sliders and selections as state has them: what the page chooses when the viewer drags that rectangle in the view of the scene (see Panel.Spatial.brushable). window is in the units of the view plane, as PageState.brush has it, and only items that are drawn in state count.
The keys of the selection selection that the rectangle window chooses on the 3-D panel number panel (counting every panel of the page from 0) with the sliders and selections as state has them: what the page chooses when the viewer drags that rectangle in the view of the scene (see Panel.Spatial.brushable). window is in the units of the view plane, as PageState.brush has it, and only items that are drawn in state count.
Attributes
- Source
- Interactive.scala
This plot with one more control.
Every panel in the palette called name: brand, reference, print, grayscale, okabe-ito or clear.
Every panel in the palette called name: brand, reference, print, grayscale, okabe-ito or clear.
Attributes
- Source
- Interactive.scala
This plot with figure as one more panel.
This plot with the 3-D scene as one more panel.
This plot with panel as one more panel.
A play button on the first slider, sweeping to its maximum in seconds.
A play button on the first slider, sweeping to its maximum in seconds.
Attributes
- Source
- Interactive.scala
A play button on the slider name, sweeping to its maximum in seconds.
A play button on the slider name, sweeping to its maximum in seconds.
Attributes
- Source
- Interactive.scala
JavaScript to run on the page; see the class's note on extending it.
JavaScript to run on the page; see the class's note on extending it.
Attributes
- Source
- Interactive.scala
This plot with one more selection: a set of keys the viewer chooses by pointing at items (see Selection).
This plot with one more selection: a set of keys the viewer chooses by pointing at items (see Selection).
Attributes
- Source
- Interactive.scala
This plot with a selection called name.
This plot with a selection called name, listed under the panels with labels(key) for each chosen key.
This plot with a selection called name, listed under the panels with labels(key) for each chosen key.
Attributes
- Source
- Interactive.scala
One change written as text, element.property=value, to every panel. See Settings.
One change written as text, element.property=value, to every panel. See Settings.
Attributes
- Source
- Interactive.scala
This plot with a slider name from min to max, starting at min.
This plot with a slider name from min to max, starting at value and written label beside it.
This plot with a slider name from min to max, starting at value and written label beside it.
Attributes
- Source
- Interactive.scala
Every panel in the style called name: default, slides, print or clear.
Every panel in the style called name: default, slides, print or clear.
Attributes
- Source
- Interactive.scala
A factor on every text size of every panel.
The heading of the page.
This plot with every 2-D panel that the page can zoom made zoomable (see Panel.Flat.zoomable): the viewer zooms in on a region with the buttons beside a panel or Ctrl and the mouse wheel, pans by dragging, and the axes follow. A panel whose axes the page cannot draw again (a log axis, a number format) and a 3-D panel are left as they are. With axes, the axes the zoom changes.
This plot with every 2-D panel that the page can zoom made zoomable (see Panel.Flat.zoomable): the viewer zooms in on a region with the buttons beside a panel or Ctrl and the mouse wheel, pans by dragging, and the axes follow. A panel whose axes the page cannot draw again (a log axis, a number format) and a 3-D panel are left as they are. With axes, the axes the zoom changes.
Attributes
- Source
- Interactive.scala
Inherited methods
fragment in the theme called theme (auto, light or dark), for callers that have a word, not a Theme (Python: a notebook shows an interactive plot by its fragment).
fragment in the theme called theme (auto, light or dark), for callers that have a word, not a Theme (Python: a notebook shows an interactive plot by its fragment).
Attributes
- Inherited from:
- Plot
- Source
- Plot.scala
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
- Source
- Product.scala
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
- Source
- Product.scala
save in the theme called theme (auto, light or dark), for callers that have a word, not a Theme (MATLAB: fig.save('diagram.svg', 'dark')).
save in the theme called theme (auto, light or dark), for callers that have a word, not a Theme (MATLAB: fig.save('diagram.svg', 'dark')).
Attributes
- Inherited from:
- Plot
- Source
- Plot.scala
save in the default theme for the file type, for callers that cannot use a default argument (Java, MATLAB: fig.save('diagram.svg')).
save in the default theme for the file type, for callers that cannot use a default argument (Java, MATLAB: fig.save('diagram.svg')).
Attributes
- Inherited from:
- Plot
- Source
- Plot.scala
Writes the plot to path: an .svg file in plain light colors with no background (another theme on request; see svgFile), or an .html page (interactive for 3-D) that follows the reader's light or dark setting and has its background. Returns the absolute path.
Writes the plot to path: an .svg file in plain light colors with no background (another theme on request; see svgFile), or an .html page (interactive for 3-D) that follows the reader's light or dark setting and has its background. Returns the absolute path.
Attributes
- Inherited from:
- Plot
- Source
- Plot.scala
Shows the plot in the live viewer, a browser tab that adds every plot view()ed (see Viewer). Inside Plot.viewWith the plot goes to the program that hosts the session instead.
Shows the plot in the live viewer, a browser tab that adds every plot view()ed (see Viewer). Inside Plot.viewWith the plot goes to the program that hosts the session instead.
Attributes
- Inherited from:
- Plot
- Source
- Plot.scala