Labeled Categories, Histograms, and Box Plots
GX-TXT P011-bis · Scientific Dataset Plot 4.4.2
A bar plot uses the values supplied for each bar. A histogram computes frequencies from raw numeric observations. A box_whisker summarizes quartiles, whiskers and outliers.
Bars of pre-aggregated frequencies
- Download category-counts.csv (ZIP) and import it into Acquisition → Generic CSV with ID
categoria.category_indexis the numeric X from 1 to 5,countis Y with 14, 8, 22, 5 and 11. Both columns are dimensionless. In the original order the IDs arev0001andv0002. - In Analysis → Scientific dataset 2D → Series… set Dataset
categoria, Xcategory_index, Ycount, Axisleft, Representation → bar. Save the series and Run. In this configuration you can leave Bar width on automatic and the baseline at zero. - In Plots select the new plot. Open Presentation → Axes… → Edit pairs…. Add 1 Quarzo, 2 Calcite, 3 Pirite, 4 Fluorite and 5 Ematite. Click Use pairs and then Save and rerender plot. Open the new PNG. The five positions remain numeric. The text appears on the five ticks.
- If needed, compare a positive Bar width in X units and a numeric Bar baseline in Y units. With two variables Bar X lower and Bar X upper you can define X intervals per row. Check width, position and baseline against the scale.


The same data and the semicolon-separated pairs work in both API v3 and v4 with Python (ZIP) or Octave (ZIP). Both scripts create two variants. The v3 and v4 renderers differ in rendering and keep the same counts and captions.


Histogram from raw readings
- Import 48 synthetic readings (ZIP) with ID
misure,sample_indexdimensionless andreading_Vin volts. - In the row Scientific dataset 2D set X =
sample_index, Y =reading_V, axisleftand Representation → histogram. The distribution uses Y as the observed variable and shows it on the X axis. The count or density goes on the Y axis. - In Histogram bins choose
4.autolets the renderer choose. The field accepts integers from 2 to 512. Choose Histogram normalization, save and publish. Repeat for each normalization or create variants.
- Class in V
- [1, 3)
- count
- 5
- probability = count/48
- 0.104167
- density = count/(48 × 2 V)
- 0.052083 V⁻¹
- Class in V
- [3, 5)
- count
- 15
- probability = count/48
- 0.312500
- density = count/(48 × 2 V)
- 0.156250 V⁻¹
- Class in V
- [5, 7)
- count
- 18
- probability = count/48
- 0.375000
- density = count/(48 × 2 V)
- 0.187500 V⁻¹
- Class in V
- [7, 9], including the maximum
- count
- 10
- probability = count/48
- 0.208333
- density = count/(48 × 2 V)
- 0.104167 V⁻¹



Box and whiskers
With the same settings, set box_whisker with series left. The editor enables Box whisker IQR and Show outliers. The first is the positive multiplier of the interquartile range, Q3−Q1. The usual value 1.5 sets the thresholds at Q1−1.5 IQR and Q3+1.5 IQR. 1 in Show outliers shows the outlying points, 0 hides them. To compare groups, use several accepted distribution series with distinct names. Check that labels, median and whiskers match the selected Datasets.
To check an outlier, download eight synthetic readings (ZIP). Set sample_index as X and reading_V as Y. With linear interpolation of the quartiles, Q1 = 1 V, median = 2 V, Q3 = 2.25 V. IQR = 1.25 V, upper threshold 4.125 V and last whisker at 3 V with multiplier 1.5. The value 10 V stays outside. With Show outliers = 1 it appears as a point. With 0 it disappears from the drawing, while the readings and quartiles remain those of the Dataset.

Distribution combinations
Histograms and box plots are published on plot.dataset.xy, in a single panel and on the left axis. Each of the two types has its own derived X axis. The validator rejects rows that mix ordinary Cartesian traces, histogram and box in the same PlotSpec, multi-panel configurations, custom X ticks and incompatible accessories such as errors, bands and bar limits. Remove the incompatible fields or create a separate plot.
A second use of discrete captions
In publication_lifecycle.py (ZIP) the case discrete_scatter uses X coordinates 0.1, 0.4 and 1.0 s with the captions Città, Valle and Crinale. The distance in the drawing follows the seconds. Both renderers also produced SVG, and the captions reappeared after reopening the Session.
Test results



