Advanced Octave A42 — Variants, output files and comparative reading

by Giux GX-TXT, octave-en, scripts-en 2 min read

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

  1. Do the two variants contain different observations?
  2. Why set the same limits helps comparison?
  3. Does the line between two points prove that the intermediate values were measured?

Worked solution

  1. No: both refer to the same variables as Dataset.
  2. Avoid a change of scale visually alters comparison.
  3. No: Connect samples graphically; any intermediate values require a model or additional measures.

Download the Module 07 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *