Advanced Octave A42 — Variants, output files and comparative reading
Advanced GNU Octave with GX-TXT · Module 07
Two graphs can represent the same samples with different visual choices. We compare them by maintaining identical data, units and limits, so the difference stands out without introducing a scale change.
Objectives and prerequisites
We use the octave_advanced_batch_a Synthetic Dataset created in A14 and Plot v4 APIs presented in A37. The example is run with GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import confronta_varianti.m, register it and run it in the Runner.
Build and compare
The script creates two variants from the same Dataset and the same variables. The first uses line_marker, the second scatter. Both show the time in seconds and the signal in volts, with vertical limits from 0.8 to 1.8 V. render produces each figure; artifacts returns information about artifacts associated with each reference.
Open the Plots tab and select the first variant:
Then select the second:
The first makes it immediate to follow the trend, but the line between samples is a graphic choice: it does not show that all intermediate positions have been observed. The second highlights the five observations available.
At the Test Session the identities are plot.dataset.xy/p0008 and plot.dataset.xy/p0009; the identifiers assigned in your Session can be different. The reference of the variant identifies the configuration of the graph; the artifact is the result produced by the rendering. It keeps both in the context of work, without confusing them with the identity of the Source Dataset.
Exercise
- Do the two variants contain different observations?
- Why set the same limits helps comparison?
- Does the line between two points prove that the intermediate values were measured?
Worked solution
- No: both refer to the same variables as Dataset.
- Avoid a change of scale visually alters comparison.
- No: Connect samples graphically; any intermediate values require a model or additional measures.
Other steps of this project
- Advanced Octave A75 — Dynamical systems in phase space
- Advanced Octave A81 — Geography of the waves and a 3D surface
- Advanced Octave A82 — Age, sex and demographic inequalities
- Advanced Octave A83 — All-cause mortality, certified COVID deaths and surveillance
- Advanced Octave A84 — A reproducible public account
- Advanced Octave A73 — Optimization landscapes and 3D trajectories