Expand description
A fast, interactive 2D plot in the spirit of matplotlib.
- Series: lines, areas, steps, scatter with seven markers, bars, error bars, functions, and horizontal/vertical reference lines; plus pie/donut slices, candlesticks, heatmaps, radar polygons, gauges, and waterfalls.
- Axes: linear or log10 scales, 1-2-5 ticks that never overlap, minor log ticks, grid, and a title and axis titles with their own size, color, and alignment; every line is snapped to the pixel grid.
- Two y axes: series marked
YAxis::Rightget their own axis on the right, with its own range, scale, ticks, and title. - Legend hover animations: 13 effects with user-defined easing, plus a direction arrow beside the newest sample of streaming line series.
- Interaction: drag to pan, wheel to zoom around the cursor (Shift: x only, Alt: y
only; with two y axes, Alt zooms the left axis over the left half of the frame and
the right axis over the right half), right-drag or the zoom tool to zoom to a box, Shift-drag or the select tool
to select an area, double-click to fit the data again, and a hover popup with the
nearest point. A small toolbar switches tools; the legend toggles series and can be
dragged anywhere inside the frame (the position lives in the
PlotState). - Lines can be smoothed with a spline or a monotone cubic (
Smoothing). - Analysis: least-squares fits (
Fit) with their equation and R². - Speed: dense sorted lines are decimated per pixel column, so a million points draw in a few milliseconds; nothing repaints while idle.
Plot3D is the 3D sibling: an orbit camera, x/y/z axes, lines, scatter, bars, and
surfaces, with the same legend, hover animations, direction arrow, themes, and
SVG/PNG export.
The view, the selection, the active tool, and hidden series live in a
PlotState the caller owns, like every other component.
Structs§
- Axis
Config - One axis: range, scale, ticks, grid, and labels.
- Bounds
- An axis-aligned range in data space.
- Bounds3D
- An axis-aligned range in 3D data space.
- Camera3D
- An orbit camera: angles, distance, target, field of view, and projection.
- Complex
- A complex sample for the FFT.
- Curve
Area Summary - The numbers behind a curve-vs-chord measurement.
- Dataset
Plot - A plot builder over two numeric dataset columns.
- Direction
Arrow Config - Settings for the direction arrow drawn beside the newest point of a line.
- Distance
Summary - The numbers behind a distance measurement.
- Export
Options - Export settings.
- Extremum
- One local extremum of a series inside a region.
- Filter
Settings - Parameters shared by the filters.
- Fit
- A fitted model: its coefficients, its goodness of fit, and an evaluator.
- Gauge
Config - Layout of gauge charts.
- Heatmap
Config - Layout of heatmaps.
- Legend
Hover Config - Settings for the legend hover animation.
- Measurement
Config - Measurement settings owned by the chart configuration.
- Model
Fit - A fitted parameter set with standard errors.
- Peak
- One detected peak: index and height.
- PieConfig
- Layout of pie and donut charts.
- Pipeline
- The ordered filter chain and the optional transform.
- Plot
- The plot builder. Add series, then call
showwith the icon cache and aPlotState. - Plot3D
- The 3D plot builder. Add series, then call
showwith the icon cache and aPlot3DState. - Plot3D
Config - The complete appearance of a 3D plot.
- Plot3D
Hover - The nearest 3D data point under the pointer.
- Plot3D
Response - What happened in the 3D plot this frame.
- Plot3D
State - The interactive state of one 3D plot. Keep it in the application model.
- Plot
Colors - Optional color overrides;
Nonefollows the theme. - Plot
Config - The complete appearance of a plot.
- Plot
Grid - A rows × columns grid of plots. Every plot shares the same
PlotState, so pan, zoom, hidden series, and selection stay linked. - Plot
Hover - The nearest data point under the pointer.
- Plot
Response - What happened in the plot this frame.
- Plot
State - The interactive state of one plot. Keep it in the application model.
- Radar
Config - Layout of radar charts. One series draws one closed polygon; several series overlay.
- Series
- One named data series. Build it with
Series::line,Series::scatter,Series::bars,Series::area,Series::step,Series::function,Series::hline, orSeries::vline, then add it to asuper::Plot. - Series3D
- One named 3D data set. Build it with
Series3D::line,Series3D::scatter,Series3D::bars,Series3D::surface, orSeries3D::surface_fn, then add it to asuper::Plot3D. - Series3D
Style - Overrides for one 3D series, matched by name.
- Series
Measurement - What one series contributes to an area measurement.
- Series
Style - Overrides for one series, matched by name.
- Statistics
- Summary statistics of a selection.
- Surface
- A regular surface:
xcolumns,yrows, and row-majorzvalues. - Surface3D
Config - Fill, lines, and color scale of a surface.
- Transform
Settings - Parameters shared by the transforms.
- View
History - A bounded back/forward history of plot views.
- Waterfall
Config - Layout of waterfall charts.
Enums§
- Animation
Easing - How the animation’s clock is shaped within one cycle.
- Chart
Mode - The family of a plot, inferred from its series.
- Colormap
- A color scale for heatmaps and colorbars.
- Dataset
Plot Kind - How a dataset series is drawn.
- Export
Format - A file format the toolbar’s export menu asked for.
- Export
Preset - Common export sizes.
- Filter
Kind - A filter available from the analysis menu.
- FitKind
- The model to fit.
- Legend
Animation - The animation played while the pointer rests on a legend row.
- Legend
Position - Where the legend sits inside the frame.
- Line
Style - How a line is stroked.
- Marker
- Point markers for scatter series and line vertices.
- Measurement
Area Style - Which area a curve-segment label shows first.
- Measurement
Mode - How the area tool measures.
- Minor
- How many minor ticks sit between two major ticks.
- Plot3D
Tool - What a primary-button drag does in a 3D plot.
- Plot
Annotation - A text note, arrow, span, or region drawn in data coordinates.
- Plot
Measurement - A persistent measurement drawn over the data.
- Plot
Tool - What a primary-button drag does.
- Projection
- How the camera projects depth.
- Renderer
- Which renderer draws the data layer.
- Scale
- How values map onto an axis.
- Smoothing
- How a line passes through its points.
- Title
Align - Where the chart title sits along the top.
- Transform
Kind - A transform available from the analysis menu.
- YAxis
- Which vertical axis a series is measured against.
Traits§
- Pipeline
Series - Apply a core pipeline to plot series.
Functions§
- box_
plot - A box plot at x = 0: box, median, whiskers, and caps.
- contour
- A contour line of a regular grid at
level, as one series with NaN breaks. - curve_
area_ summary - Compute the curve-vs-chord summary for a
PlotMeasurement::CurveArea. - derivative
- Central-difference derivative; the ends use one-sided differences.
- fft
- In-place radix-2 FFT. The length must be a power of two.
- find_
peaks - Detect local maxima above
min_height, at leastmin_distancesamples apart. - fit_
model - Gauss–Newton fit with numerical Jacobians and Levenberg damping.
- hexbin
- A regular hexbin/2D-density grid of
[x, y, count]cells, ready forSeries::heatmap. - histogram
- A histogram of
valuesas centered bars. - histogram_
density - A histogram normalized so the bar areas sum to one; a density estimate appears as a line over the same bars.
- integral
- Trapezoidal integral, with the running area at every sample.
- points_
in - Indices of the points of
datainsidebounds(data space), for selections. - polar
- Convert polar samples
(theta, radius)to a cartesian line. - region_
measurements - The statistics of every visible series inside
bounds. - region_
size - A rectangle’s data-space width/height, useful for an editor.
- remove_
baseline - Subtract a rolling baseline in place.
- resample
- Linear resampling to
lensamples. - rolling_
baseline - A rolling-minimum baseline.
windowis clamped to an odd number of samples. - savgol
- Savitzky–Golay smoothing. Returns the same length; the edges are clamped.
- savgol_
derivative - Savitzky–Golay first derivative, per sample step.
- set_
output_ format gpu - Set the host’s wgpu surface format. Returns whether the format is supported.
- show_
colorbar - A colorbar widget for an existing colormap, drawn at the current cursor.
- smith
- Convert impedance samples
(resistance, reactance)to a Smith-chart reflection line. - spectrum
- A one-sided magnitude spectrum:
[frequency, magnitude]up to Nyquist. - to_
unicode_ math - Convert a LaTeX subset to Unicode text.
- violin
- A violin outline from a Gaussian kernel density estimate, centered at x = 0.