Scatter Plot
SinksThe ScatterPlot block displays the empirical joint distribution of two continuous or discrete signals as a two-dimensional point cloud on the canvas. At each simulation step, the simultaneous instantaneous values of the and inputs are plotted as a distinct point marker. Over the course of a simulation run, this builds up an aggregated scatter diagram, making it an indispensable tool for identifying cross-correlations, inspecting sensor noise covariance, visualizing Poincaré return maps, and studying Lissajous frequency ratios.
Mathematical Model
The block records pairs of input samples at discrete simulation time steps :
The empirical bivariate sample covariance between signals and across points is:
with Pearson correlation coefficient:
Points are plotted on the canvas at screen coordinates transformed from data coordinates , with each dot rendered with a radius proportional to pointSize and colored by color.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | x |
X | number | Required |
| → In | y |
Y | number | Required |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
title |
Title | text | Scatter Plot |
|
pointSize |
Point Size | number | 4 |
|
color |
Color | string | #2563eb |
|
showGrid |
Show Grid | boolean | true |
Usage Examples
Example 1: Lissajous Curve Generation and Frequency Ratio Analysis
Verifying frequency and phase alignment between two harmonic oscillators. Driving input with a sinusoid () and input with a sinusoid (). The resulting point cloud traces a stationary 1:3 Lissajous figure, providing visual confirmation of harmonic ratio without time-domain oscilloscope triggering.
Example 2: Dual-Sensor Noise Correlation and Covariance Analysis
Assessing whether sensor measurement noise on channel 1 is statistically independent of noise on channel 2. Routing two noisy sensor signals to ports and with pointSize = 2 and color = "#10b981". A circular, symmetric Gaussian point cloud confirms uncorrelated independent white noise (), whereas an elongated tilted ellipse reveals cross-coupling covariance.
Remarks & Best Practices
- Point-Cloud Accumulation: Unlike
XYPlot(which maintains a sliding FIFO trail of recent points),ScatterPlotaccumulates all sample pairs for the entire simulation run, preserving the full statistical dataset. - Terminal Sink Node: ScatterPlot has no output ports and does not feed downstream simulation blocks; it operates purely as a visual analytical sink.
- Independent Coordinate Axes: The horizontal axis strictly represents signal , while the vertical axis represents ; simulation time is not plotted directly on either axis.
- Clearing on Simulation Restart: The accumulated point buffer clears automatically whenever a simulation run is restarted, ensuring a clean canvas for subsequent runs.
Related Components
- XYPlot: Phase-plane display with configurable fading trail length for dynamic trajectory visualization.
- uPlotDisplay: Multi-channel time-series oscilloscope.
- RandomNumber: Stochastic noise source for covariance testing.
- NumericDisplay: Real-time LCD digital scalar readout.