Histogram Block
Visualizes data distribution
Open Histogram in BlockWerk →# Histogram Block
Description
The Histogram block accumulates incoming scalar values over the simulation run and renders their frequency distribution as a bar histogram. Values are sorted into a fixed number of equal-width bins spanning a user-defined range, giving an at-a-glance view of the statistical character of a signal.
This block is well suited to noise analysis, Monte Carlo result inspection, and quality-control monitoring where the shape of the distribution — not the time-series waveform — is the quantity of interest.
Parameters
bins
Number of equal-width bins that span the [minValue, maxValue] range. Higher values give finer resolution at the cost of requiring more samples before the distribution stabilises. Default: 20.
minValue
Lower bound of the histogram range. Samples below this value are clamped to the first bin. Default: -5.
maxValue
Upper bound of the histogram range. Samples above this value are clamped to the last bin. Default: 5.
Examples
Analysing sensor noise
NoiseSensor → Histogram
Connect a noisy sensor output directly to the Histogram to observe whether the noise is approximately Gaussian and to measure its spread.
Monte Carlo output distribution
RandomSource → Plant → Histogram
Drive the plant with a random input source; the Histogram displays the resulting output distribution across the simulation run.
Remarks
- Sink block: Histogram has no output ports. It is a terminal display node and does not feed any downstream computation.
- Scalar input: The input port accepts a scalar numeric signal. Each simulation step contributes one sample to the accumulated distribution.
- Accumulation: Unlike instantaneous display blocks, the Histogram accumulates all samples from simulation start. The distribution becomes more stable as the run length increases.
- Range clamping: Samples outside
[minValue, maxValue]are counted in the boundary bins, not discarded. Adjust the range if the distribution appears heavily clipped.
See Also
- BarChart: Displays per-element values of an array signal rather than a statistical distribution.
- ScatterPlot: Plots pairs of scalar values to reveal correlation between two signals.
- uPlotDisplay: Monitors the time-series waveform of a signal over the full simulation run.