Worked Examples
Validate axis scales and units — Visualization & Graphing
Validate axis scales and units — Visualization & Graphing Cross-application area: Visualization & Graphing Status: Initial scientific graphics guidance; platform-specific features not verified. Scientific objective Evaluate whethe
Application area: Visualization & Graphing
Article classification: Scientific validation / Axis scales / Dimensional consistency
Audience: Researchers, scientific programmers, visualization developers, data analysts, QA engineers, and publication reviewers
Technical level: Intermediate to advanced
Reference environment: Python 3, NumPy, Matplotlib, and pytest
Scientific references: BIPM SI Brochure, NIST SI guidance, renderer specifications, and WCAG 2.2
Primary outputs: Unit-validation record, axis-domain tests, numerical reconciliation, rendered comparison figures, and scientific acceptance evidence
Estimated reading time: 13–16 minutes, excluding practical exercises
1. Scientific objective
Axis-scale and unit validation determines whether a scientific graphic preserves the numerical meaning, measurement dimensions, sign, and relative relationships of the underlying observations or modeled results.
An axis is not merely a presentation element. Its scale, range, labels, and units affect how scientific evidence is interpreted.
Validation must establish that:
- The plotted quantity is correctly identified and scientifically defined.
- Measurement units are appropriate and dimensionally consistent.
- Any unit conversion produces the correct numerical values.
- The chosen axis transformation is valid for the input domain.
- Relevant positive, negative, and zero values remain interpretable.
- The plotting range does not silently conceal relevant observations.
- The baseline is appropriate to the graphical mark and scientific question.
- Uncertainty and interval bounds are converted consistently.
- Rendered coordinates, labels, and scales reconcile with the numerical source.
- The selected representation supports the intended scientific interpretation without material distortion.
Central acceptance condition: The plotting range must not exaggerate differences or obscure sign, and all displayed values, scales, and units must be scientifically justified and independently verifiable.
Correct conversion arithmetic alone does not establish that a chart is scientifically appropriate.
2. Define the unit of validation
Axis validation should examine several distinct properties.
| Dimension | Validation question |
|---|---|
| Scientific variable | What physical or statistical quantity is represented? |
| Source unit | What unit was used in the authoritative dataset? |
| Display unit | What unit appears on the axis? |
| Conversion | Was the correct conversion applied to values and uncertainty? |
| Scale transformation | Is the transformation mathematically valid and scientifically appropriate? |
| Axis range | Are relevant observations and intervals visible? |
| Baseline | Does the chosen baseline preserve the meaning of graphical lengths or positions? |
| Sign convention | Do positive, negative, and zero have correctly stated meanings? |
| Reference system | Are time or spatial coordinates interpreted consistently? |
| Rendering | Do displayed graphical properties match the validated specification? |
| Communication | Can a reader understand the scale and numerical relationship? |
Passing each applicable numerical test is necessary for technical correctness, but independent review remains necessary to assess whether the result communicates the scientific relationship responsibly.
3. Establish the authoritative measurement contract
Before validating a figure, identify the original dataset and its measurement definitions.
Record:
- Dataset identifier and immutable revision.
- Source artifact checksum.
- Variable name and scientific definition.
- Observation or experimental unit.
- Original and displayed measurement units.
- Dimensional quantities and denominators.
- Reference zero and sign convention.
- Uncertainty definition and measurement precision.
- Temporal or spatial coverage.
- Missing, excluded, and censored observations.
- Analytical transformations and processing revision.
For example, a figure displaying tonnes of CO₂ per hectare per year cannot be reconciled directly with source values recorded as tonnes of carbon per field without accounting for chemical mass conversion, area, and time.
The source metadata must establish which quantities are actually available before attempting a conversion.
4. Validate physical unit consistency
4.1 Multiplicative unit conversions
Many conversions take the form:
y = a * x
For example:
1 kilogram = 1000 grams
mass_kg = mass_g / 1000
For an exact conversion factor, the expected value should reconcile with the converted result within an appropriate numerical tolerance.
4.2 Affine unit conversions
Some unit conversions contain an offset:
y = a * x + b
For temperature:
Temperature_K =
Temperature_C + 273.15
Absolute temperatures must be distinguished from temperature differences.
A difference of 1 °C equals a difference of 1 K, but an absolute temperature of 0 °C equals 273.15 K.
4.3 Dimensional compatibility
Different physical quantities must not be treated as equivalent merely because they have numerical values.
| Quantity A | Quantity B | Required consideration |
|---|---|---|
| Mass (kg) | Mass (g) | Mass-unit conversion |
| Temperature (°C) | Temperature (K) | Offset conversion for absolute temperature |
| Carbon mass (t C) | Carbon dioxide mass (t CO₂) | Molar-mass conversion |
| Total mass (t) | Mass per area (t/ha) | Area denominator |
| Annual flux | Cumulative quantity | Temporal integration and interval definition |
| Concentration | Total inventory | Volume or mass basis and conversion method |
For the conventional approximation using molar masses:
t CO2 = t C * (44 / 12)
This is a mass-equivalence calculation, not evidence that a particular amount of atmospheric CO₂ has been permanently removed.
The BIPM SI Brochure and NIST guidance provide authoritative conventions for units, symbols, and dimensional consistency (BIPM, 2019; NIST, 2008).
5. Validate sign conventions and zero
Scientific datasets frequently include signed quantities.
Examples include temperature anomalies, model residuals, net energy balances, economic changes, and carbon fluxes.
Consider:
Values: -4, -2, 0, 3, 5
A plotting range of 0 to 6 would conceal the negative values.
If negative and positive values are scientifically meaningful, the figure must communicate their sign and the meaning of zero.
5.1 Signed physical quantities
For a net flux, define the positive and negative directions explicitly.
For example:
Illustrative convention:
Positive = flux to atmosphere
Negative = flux from atmosphere
This convention is illustrative and must not be applied automatically to all scientific datasets. The authoritative measurement method determines the sign convention.
5.2 Zero is not always absence
Zero can mean different things depending on the quantity.
- Zero mass represents the absence of mass.
- Zero net flux represents a balance under the defined sign convention.
- Zero temperature anomaly represents no deviation from the reference.
- Zero degrees Celsius is not zero thermodynamic temperature.
For each chart, confirm that the selected baseline has an appropriate numerical and physical interpretation.
6. Validate linear axis ranges
A linear axis maps numerical differences proportionally to graphical distances.
A simplified coordinate mapping is:
p = a*x + b
Equal changes in x produce equal graphical-position changes when a is constant.
6.1 Magnitude bars
Bar charts encode numerical magnitude through graphical length relative to a baseline.
For positive quantities, a zero baseline generally preserves proportional interpretation.
Consider:
A = 10
B = 12
Actual ratio = 12 / 10 = 1.2
If the visible baseline is 9:
A length = 10 - 9 = 1
B length = 12 - 9 = 3
Visible length ratio = 3
That visible ratio exaggerates the relative magnitudes.
The axis itself may be numerically valid, but the bar-length representation is misleading for the intended comparison.
6.2 Point and line charts
Point charts generally encode numerical values through position rather than bar length.
A truncated axis is not automatically invalid for such charts. Nevertheless, it must be labeled clearly and must not remove relevant evidence or context.
Validate the suitability of the baseline in relation to the mark type and the research question, rather than applying an indiscriminate zero-baseline rule to every chart.
7. Validate logarithmic transformations
A conventional logarithmic transformation is:
z = log_b(x)
where:
x > 0
b > 0
b != 1
For base 10:
x = 1 z = 0
x = 10 z = 1
x = 100 z = 2
x = 1000 z = 3
A logarithmic axis preserves multiplicative relationships rather than equal arithmetic differences.
7.1 Domain validation
For a standard real-valued logarithmic scale, values must be positive.
Zero, negative values, NaN, and infinity cannot be silently plotted as ordinary finite positive logarithmic values.
Explicit data-exclusion or transformation policies are required where these values occur.
7.2 Transformation disclosure
Distinguish:
- Original measurements displayed using a logarithmic axis.
- Log-transformed numerical values displayed on a linear axis.
These representations may appear similar but have different implications for axis labels, numerical tables, and interpretation.
7.3 Symmetric logarithmic scales
Some signed quantities can be shown using a symmetric logarithmic scale.
Such transformations require an explicit near-zero region and documented threshold or scaling parameters.
Do not treat symmetric logarithmic and ordinary logarithmic scales as interchangeable.
8. Validate uncertainty and interval conversions
Scientific axes frequently display estimates with uncertainties.
Uncertainty must remain consistent with the converted quantity and its statistical meaning.
8.1 Linear conversion of uncertainty
For:
y = a*x
the standard uncertainty transforms as:
u_y = |a| * u_x
For an affine conversion:
y = a*x + b
the same expression applies when a and b are exact constants and u_x represents the relevant standard uncertainty.
For example:
Source:
1000 ± 20 g
Display:
1.000 ± 0.020 kg
8.2 Interval endpoints
For a monotonic increasing transformation, interval endpoints preserve their order.
For a decreasing transformation, their order reverses and must be reassigned correctly.
For a nonlinear transformation, simply applying a derivative-based uncertainty formula may not adequately represent an asymmetric or broad interval.
Validate lower and upper bounds separately when the scientific interval requires that treatment.
8.3 Statistical interval meaning
Do not confuse:
- Measurement uncertainty.
- Sample standard deviation.
- Standard error.
- Confidence intervals.
- Prediction intervals.
- Credible intervals.
Each has distinct assumptions and interpretation.
Correctly converting an interval’s units cannot establish that the interval was statistically appropriate in the first place.
9. Construct a deterministic validation fixture
The following synthetic data contain positive mass measurements, signed deviations, and a quantity with an associated uncertainty.
| Record | Mass (g) | Mass (kg) | Deviation (synthetic units) |
|---|---|---|---|
| R01 | 500 | 0.5 | -4 |
| R02 | 1000 | 1.0 | -2 |
| R03 | 2000 | 2.0 | 0 |
| R04 | 4000 | 4.0 | 3 |
| R05 | 8000 | 8.0 | 5 |
Expected invariants:
Mass conversion:
kg = g / 1000
Positive mass values:
Suitable for ordinary log scaling
Signed deviations:
Require explicit sign preservation
Mass uncertainty example:
1000 ± 20 g = 1.000 ± 0.020 kg
The synthetic values have no empirical interpretation. They are designed to verify numerical and graphical behavior.
10. Implement the numerical validation module
10.1 Prepare the environment
mkdir axis-scientific-validation
cd axis-scientific-validation
python3 -m venv .venv
source .venv/bin/activate
python -m pip install numpy matplotlib pytest
python --version
python -m pip freeze > requirements-lock.txt
The freeze file records installed package versions. Controlled production execution should use a reviewed, pinned environment and appropriate artifact-integrity checks.
10.2 Create the validation module
Save as axis_validation.py.
from dataclasses import dataclass
import numpy as np
@dataclass(frozen=True)
class AxisSpec:
scale: str
lower: float
upper: float
mark_type: str
unit: str
require_full_coverage: bool = True
def convert_mass_g_to_kg(values):
data = np.asarray(
values,
dtype=float
)
if not np.isfinite(data).all():
raise ValueError(
"Nonfinite source values"
)
return data / 1000.0
def convert_uncertainty(
value,
standard_uncertainty,
factor,
offset=0.0
):
parameters = np.asarray(
[
value,
standard_uncertainty,
factor,
offset
],
dtype=float
)
if not np.isfinite(parameters).all():
raise ValueError(
"Nonfinite conversion parameter"
)
if standard_uncertainty < 0:
raise ValueError(
"Negative uncertainty"
)
return (
factor * value + offset,
abs(factor) * standard_uncertainty
)
def validate_axis(values, spec):
data = np.asarray(
values,
dtype=float
)
if data.ndim != 1 or data.size == 0:
raise ValueError(
"Invalid data structure"
)
if not np.isfinite(data).all():
raise ValueError(
"Nonfinite plotted values"
)
if spec.scale not in {
"linear", "log"
}:
raise ValueError(
"Unsupported scale"
)
if spec.mark_type not in {
"bar", "point", "line"
}:
raise ValueError(
"Unsupported mark type"
)
if not spec.unit.strip():
raise ValueError(
"Missing measurement unit"
)
if not (
np.isfinite(spec.lower)
and np.isfinite(spec.upper)
and spec.lower < spec.upper
):
raise ValueError(
"Invalid axis limits"
)
if spec.scale == "log":
if np.any(data <= 0):
raise ValueError(
"Log scale requires positive values"
)
if spec.lower <= 0:
raise ValueError(
"Log lower limit must be positive"
)
if spec.mark_type == "bar":
raise ValueError(
"Magnitude bars not supported "
"on logarithmic axes by this contract"
)
if (
spec.scale == "linear"
and spec.mark_type == "bar"
):
if not (
spec.lower <= 0 <= spec.upper
):
raise ValueError(
"Bar baseline zero not visible"
)
if spec.require_full_coverage:
if np.any(
(data < spec.lower)
| (data > spec.upper)
):
raise ValueError(
"Axis clips source values"
)
return True
def verify_sign_preservation(values, spec):
data = np.asarray(
values,
dtype=float
)
validate_axis(data, spec)
if np.any(data < 0) and spec.lower >= 0:
raise ValueError(
"Negative values not represented"
)
if np.any(data > 0) and spec.upper <= 0:
raise ValueError(
"Positive values not represented"
)
return True
def validate_interval(lower, upper, spec):
if not (
np.isfinite(lower)
and np.isfinite(upper)
and lower <= upper
):
raise ValueError(
"Invalid interval"
)
return validate_axis(
[lower, upper],
spec
)
def reference_fixture():
return {
"record_ids": (
"R01", "R02", "R03",
"R04", "R05"
),
"mass_g": np.array(
[
500., 1000., 2000.,
4000., 8000.
]
),
"deviation": np.array(
[-4., -2., 0., 3., 5.]
)
}
This reference module supports specified linear and ordinary logarithmic axes. It does not implement symmetric logarithmic axes, dimensional algebra, spatial transformations, or arbitrary nonlinear uncertainty propagation.
The zero-baseline rule in the module is an intentionally conservative policy for magnitude bars. It should not be generalized to all possible marks or applications without scientific review.
11. Generate and inspect reference figures
Save the following as render_axis_validation.py.
from pathlib import Path
import hashlib
import json
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from axis_validation import (
AxisSpec,
convert_mass_g_to_kg,
reference_fixture,
validate_axis,
verify_sign_preservation
)
OUTPUT = Path("validation-output")
OUTPUT.mkdir(exist_ok=True)
def sha256_file(path):
return hashlib.sha256(
Path(path).read_bytes()
).hexdigest()
def render():
fixture = reference_fixture()
mass_kg = convert_mass_g_to_kg(
fixture["mass_g"]
)
deviation = fixture["deviation"]
labels = fixture["record_ids"]
expected = np.array(
[0.5, 1., 2., 4., 8.]
)
np.testing.assert_allclose(
mass_kg,
expected,
rtol=0,
atol=1e-12
)
linear = AxisSpec(
scale="linear",
lower=0,
upper=9,
mark_type="point",
unit="kg"
)
logarithmic = AxisSpec(
scale="log",
lower=0.1,
upper=10,
mark_type="point",
unit="kg"
)
signed = AxisSpec(
scale="linear",
lower=-6,
upper=6,
mark_type="point",
unit="synthetic units"
)
validate_axis(mass_kg, linear)
validate_axis(mass_kg, logarithmic)
verify_sign_preservation(
deviation,
signed
)
artifacts = {}
for name, values, spec in (
("linear-mass", mass_kg, linear),
("log-mass", mass_kg, logarithmic),
("signed-deviation", deviation, signed)
):
fig, ax = plt.subplots(
figsize=(7, 4.5),
dpi=160
)
x = np.arange(len(values))
ax.scatter(
x,
values,
marker="o",
s=55
)
ax.set_xticks(x, labels)
ax.set_xlabel("Synthetic record")
ax.set_ylabel(
f"Value ({spec.unit})"
)
ax.set_yscale(spec.scale)
ax.set_ylim(
spec.lower,
spec.upper
)
if name == "signed-deviation":
ax.axhline(
0,
linewidth=1,
linestyle="--"
)
ax.set_title(name.replace("-", " ").title())
assert ax.get_yscale() == spec.scale
np.testing.assert_allclose(
ax.get_ylim(),
(spec.lower, spec.upper),
rtol=0,
atol=1e-12
)
fig.tight_layout()
path = OUTPUT / f"{name}.png"
fig.savefig(path)
plt.close(fig)
artifacts[name] = sha256_file(path)
report = {
"dataset": "synthetic_axis_fixture",
"source_units": {
"mass": "g",
"deviation": "synthetic units"
},
"display_units": {
"mass": "kg",
"deviation": "synthetic units"
},
"mass_kg": mass_kg.tolist(),
"deviation": deviation.tolist(),
"artifact_sha256": artifacts,
"numerical_validation": "pass",
"axis_configuration": "pass",
"visual_review": "not_tested",
"accessibility": "not_tested",
"scientific_review": "not_tested"
}
(OUTPUT / "validation-report.json").write_text(
json.dumps(report, indent=2),
encoding="utf-8"
)
return report
if __name__ == "__main__":
report = render()
print(
"Mass conversion:",
report["mass_kg"]
)
print(
"Axis configuration: PASS"
)
11.1 Execute the reference renderer
python render_axis_validation.py
Expected output:
Mass conversion: [0.5, 1.0, 2.0, 4.0, 8.0]
Axis configuration: PASS
The exercise generates:
validation-output/
linear-mass.png
log-mass.png
signed-deviation.png
validation-report.json
Inspect each figure independently.
The linear and logarithmic figures display the same synthetic mass values under different transformations. The signed-deviation figure demonstrates a scale that includes negative values, zero, and positive values.
The script checks numerical data and renderer configuration. It does not establish that all graphical properties are accessible or scientifically appropriate to a particular research question.
12. Develop automated negative tests
Scientific validation should demonstrate that invalid scale configurations and conversion errors are rejected.
Save as test_axis_validation.py.
import numpy as np
import pytest
from axis_validation import (
AxisSpec,
convert_mass_g_to_kg,
convert_uncertainty,
validate_axis,
validate_interval,
verify_sign_preservation
)
def test_mass_conversion():
result = convert_mass_g_to_kg(
[500., 1000., 2000.]
)
np.testing.assert_allclose(
result,
[0.5, 1., 2.],
rtol=0,
atol=1e-12
)
def test_temperature_conversion():
value, uncertainty = convert_uncertainty(
0.0,
0.5,
1.0,
273.15
)
assert value == pytest.approx(273.15)
assert uncertainty == pytest.approx(0.5)
def test_uncertainty_conversion():
value, uncertainty = convert_uncertainty(
1000.0,
20.0,
0.001
)
assert value == pytest.approx(1.0)
assert uncertainty == pytest.approx(0.02)
def test_signed_linear_axis():
spec = AxisSpec(
"linear", -6, 6,
"point", "synthetic units"
)
assert verify_sign_preservation(
[-4., 0., 5.],
spec
)
def test_positive_log_axis():
spec = AxisSpec(
"log", 0.1, 100.,
"point", "kg"
)
assert validate_axis(
[1., 10., 100.],
spec
)
def test_zero_on_log_axis_rejected():
spec = AxisSpec(
"log", 0.1, 10.,
"point", "kg"
)
with pytest.raises(ValueError):
validate_axis(
[0., 1., 10.],
spec
)
def test_negative_log_value_rejected():
spec = AxisSpec(
"log", 0.1, 10.,
"point", "kg"
)
with pytest.raises(ValueError):
validate_axis(
[-1., 1., 10.],
spec
)
def test_negative_values_clipped_rejected():
spec = AxisSpec(
"linear", 0, 10,
"point", "synthetic units"
)
with pytest.raises(ValueError):
verify_sign_preservation(
[-4., 3., 5.],
spec
)
def test_truncated_bar_baseline_rejected():
spec = AxisSpec(
"linear", 9, 15,
"bar", "kg"
)
with pytest.raises(ValueError):
validate_axis(
[10., 12.],
spec
)
def test_zero_baseline_bar_accepted():
spec = AxisSpec(
"linear", 0, 15,
"bar", "kg"
)
assert validate_axis(
[10., 12.],
spec
)
def test_interval_clipping_rejected():
spec = AxisSpec(
"linear", 0, 5,
"point", "kg"
)
with pytest.raises(ValueError):
validate_interval(
2., 6.,
spec
)
def test_reversed_limits_rejected():
spec = AxisSpec(
"linear", 10, 0,
"point", "kg"
)
with pytest.raises(ValueError):
validate_axis(
[2., 4.],
spec
)
def test_negative_uncertainty_rejected():
with pytest.raises(ValueError):
convert_uncertainty(
100., -2., 0.001
)
@pytest.mark.parametrize(
"invalid",
[np.nan, np.inf, -np.inf]
)
def test_nonfinite_values_rejected(invalid):
with pytest.raises(ValueError):
convert_mass_g_to_kg(
[1000., invalid]
)
def test_empty_axis_data_rejected():
spec = AxisSpec(
"linear", 0, 5,
"point", "kg"
)
with pytest.raises(ValueError):
validate_axis([], spec)
Execute:
python -m pytest -v test_axis_validation.py
The suite defines seventeen test cases after expanding the parameterized nonfinite-value test.
These tests cover arithmetic conversion, uncertainty conversion, sign preservation, logarithmic domains, clipping, baseline rules, invalid limits, and empty input.
They are expected to pass under a compatible environment but have not been presented here as independently executed Sustainable Catalyst acceptance results.
13. Validate rendering against source values
The plotted numerical values must agree with authoritative source data and approved transformations.
Review the following layers separately:
| Layer | Validation |
|---|---|
| Source | Correct observations, units, version, and metadata |
| Conversion | Correct factor, offset, and dimensional interpretation |
| Analytical transformation | Correct calculations and exclusions |
| Axis configuration | Correct scale type, limits, and direction |
| Graphical marks | Correct coordinate mapping and geometry |
| Labels and ticks | Correct units, precision, and scale representation |
| Export | Intended marks and configuration preserved |
| Interpretation | Visual comparison supports the scientific claim |
For Matplotlib, properties such as ax.get_yscale(), ax.get_ylim(), and plotted artist data can be inspected programmatically.
These checks should be supplemented with actual visual inspection of the exported figure, including tick labels, legends, clipping, and apparent comparisons.
14. Validate temporal and spatial axes
14.1 Temporal axes
Validate:
- Timestamp meaning and time zone.
- Temporal ordering.
- Actual spacing between observations.
- Aggregation periods.
- Missing intervals.
- Interpolation and resampling.
- Observation versus forecast status.
A line connecting daily observations does not automatically establish that intermediate states were measured continuously.
If time is converted between units, verify the conversion and its reference convention.
14.2 Geographic coordinates
For geospatial figures, confirm:
- The coordinate reference system.
- Whether axes represent degrees, meters, or another coordinate unit.
- The projection used.
- Relevant spatial extent.
- Aspect ratio and geometric distortion.
- Consistency across compared maps.
Latitude and longitude are angular coordinates. They must not be treated as planar distance measurements without a justified spatial transformation.
A spatial plot can contain numerically correct source coordinates while displaying misleading distances or areas due to projection or aspect-ratio choices.
15. Independent scientific sensitivity review
An independent reviewer should determine whether reasonable alternative axis choices materially change the apparent scientific relationship.
Compare:
- Linear and logarithmic scales, when both are scientifically valid.
- Zero and nonzero baselines appropriate to the mark geometry.
- Alternative ranges with disclosed clipping rules.
- Original and converted units.
- Different scientific reference periods.
- Different spatial coordinate systems and projections.
- Representations with and without relevant uncertainty.
Where the interpretation changes materially, document why the selected representation is appropriate.
Do not select an axis transformation solely because it makes a preferred result appear more pronounced.
16. Accessibility and numerical equivalence
Axis validation should include accessible interpretation of scientific scales.
Provide:
- Explicit variable labels and measurement units.
- Clear tick values and scale descriptions.
- Accessible numerical tables.
- Explanation of sign and zero.
- Descriptions of logarithmic or other transformations.
- Units and definitions of uncertainty intervals.
- Extended explanations for complex graphics.
- Accessible interactive controls where applicable.
W3C guidance recommends appropriate alternatives for complex graphical information, including extended descriptions and structured data (W3C WAI, n.d.).
Scientific values should remain understandable even when the visual chart cannot be perceived directly.
17. Scientific acceptance matrix
| Criterion | Pass condition | Evidence |
|---|---|---|
| Source integrity | Authoritative dataset and revision identified | Source reference and checksum |
| Variable definition | Scientific quantity and observational unit correctly specified | Variable metadata |
| Dimensional consistency | Units represent compatible quantities | Dimensional review |
| Conversion arithmetic | Values reconcile with correct unit conversions | Independent numerical tests |
| Uncertainty conversion | Intervals and uncertainty transformed correctly | Statistical comparison |
| Scale domain | Values satisfy transformation requirements | Domain tests |
| Baseline | Baseline is appropriate to the quantity and mark geometry | Chart review |
| Sign preservation | Positive, negative, and zero meanings remain interpretable | Numerical and visual tests |
| Range and clipping | Relevant values and intervals are visible or exclusions disclosed | Range verification |
| Temporal consistency | Reference periods and time coordinates correct | Temporal validation |
| Spatial consistency | Projection and coordinate units appropriate | Spatial validation |
| Rendering fidelity | Mark coordinates, ticks, and labels match specification | Renderer inspection |
| Accessibility | Essential quantitative meaning available accessibly | Accessibility review |
| Reproducibility | Conversion and rendering can be independently reconstructed | Execution receipt |
| Scientific interpretation | Scale choices do not materially distort the intended inference | Independent scientific review |
Decision rule: Record each applicable criterion as Pass, Fail, Not Tested, or Not Applicable where appropriate. Mandatory failed or untested criteria prevent certification of the relevant scientific representation.
Passing computational tests does not automatically establish that the axis design is suitable for publication.
18. Reproducibility and evidence manifest
A validation package should preserve:
- Authoritative source dataset and immutable version.
- Source checksum and provenance.
- Original and display units.
- Conversion formulas and parameters.
- Source and converted uncertainty values.
- Axis scales, limits, direction, and tick formatting.
- Clipping and missing-data policies.
- Temporal or geographic reference systems.
- Numerical validation scripts and results.
- Renderer and dependency versions.
- Original and exported figure artifacts.
- Artifact hashes.
- Accessible numerical equivalents.
- Scientific review and acceptance outcomes.
18.1 Example machine-readable manifest
The following is a proposed documentation structure, not a verified Sustainable Catalyst API contract.
{
"schema_version": "example-1.0",
"figure_id": "synthetic-axis-validation",
"source": {
"dataset_id": "synthetic-mass-and-deviation",
"revision": "1.0",
"classification": "synthetic",
"sha256": null
},
"variables": {
"mass": {
"source_unit": "g",
"display_unit": "kg",
"conversion": "x / 1000"
},
"deviation": {
"display_unit": "synthetic_units",
"signed": true,
"zero_reference": 0
}
},
"axis_configurations": [
{
"variable": "mass",
"scale": "linear",
"limits": [0, 9]
},
{
"variable": "mass",
"scale": "log",
"limits": [0.1, 10]
},
{
"variable": "deviation",
"scale": "linear",
"limits": [-6, 6]
}
],
"validation": {
"source_integrity": "not_tested",
"unit_conversion": "not_tested",
"scale_domain": "not_tested",
"sign_preservation": "not_tested",
"clipping": "not_tested",
"uncertainty": "not_tested",
"rendering": "not_tested",
"accessibility": "not_tested",
"scientific_review": "not_tested"
},
"release_decision": "NO_GO"
}
Populate actual versions, checksums, reviewer identities, and validation results from executed tests and independently retained evidence.
19. Sustainable Catalyst integration responsibilities
Axis and unit validation is relevant to the intended scientific capabilities across Sustainable Catalyst.
The following describes proposed cross-application responsibilities, not independently verified deployed behavior.
| Application | Intended responsibility |
|---|---|
| Library | Preserve source variables, units, revisions, provenance, and data rights |
| Workbench | Perform reproducible unit conversions, calculations, and numerical tests where implemented |
| Research Lab | Evaluate measurement validity, uncertainty, and scientific assumptions |
| Visualization & Graphing | Apply validated axis specifications, graphical scales, and labels |
| Site Intelligence | Validate coordinate reference systems and spatial measurement representations where supported |
| Decision Studio | Preserve consistent units and scales in scenario comparisons where implemented |
| Workspace | Track figure revisions, validation evidence, ownership, and review decisions |
| Research | Publish approved figures with units, methods, provenance, and scientific limitations |
19.1 Platform source-audit requirements
Before certifying a specific Sustainable Catalyst axis-scale or unit-validation capability, identify:
- Owning repository and exact implementation revision.
- Actual renderer and adapter versions.
- Source-variable and unit schemas.
- Implemented conversion rules and numerical dependencies.
- Supported scale types and domain behavior.
- Baseline, sign, and clipping semantics.
- Uncertainty propagation support and limitations.
- Executed unit and integration tests.
- Actual rendering screenshots and exported artifacts.
- Accessibility and scientific review evidence.
- Known unsupported transformations and unresolved defects.
The presence of plotting libraries or selectable axes does not establish that end-to-end unit validation and scientific figure acceptance are operational.
20. Scientific limitations and escalation
Escalate for scientific or engineering review when:
- Source and display units are inconsistent or undefined.
- A conversion produces incorrect values or uncertainty.
- Sign conventions are unclear or contradicted by the figure.
- Relevant observations or intervals are silently clipped.
- Logarithmic scaling excludes zero or negative values without explanation.
- Axes make scientifically incompatible quantities appear directly comparable.
- Spatial or temporal reference systems are inconsistent.
- Scale choices materially exaggerate the intended comparison.
- Independent review identifies an unsupported interpretation.
- A published scientific or policy claim depends on the affected figure.
Preserve the original figure and source artifact when investigating a defect. Corrected figures should receive identifiable revisions and appropriate publication review rather than silently replacing accepted evidence.
Correct axis scales and unit conversions cannot repair biased sampling, invalid measurement methods, inappropriate statistical assumptions, or unsupported causal conclusions.
21. Technical references
- Bureau International des Poids et Mesures (BIPM) (2019). The International System of Units (SI Brochure). 9th edition, with subsequent updates. Available at: https://www.bipm.org/en/publications/si-brochure.
- Thompson, A. and Taylor, B.N. (2008). Guide for the Use of the International System of Units (SI). NIST Special Publication 811. Available at: NIST publication page.
- Matplotlib Development Team (n.d.). Axis Scales. Available at: Matplotlib documentation.
- Matplotlib Development Team (n.d.). matplotlib.axes.Axes.set_yscale. Available at: Matplotlib API documentation.
- Vega-Lite Developers (n.d.). Scale. Available at: Vega-Lite documentation.
- Harris, C.R. et al. (2020). ‘Array programming with NumPy’, Nature, 585, pp. 357–362. Available at: https://doi.org/10.1038/s41586-020-2649-2.
- NumPy Developers (n.d.). numpy.testing.assert_allclose. Available at: NumPy documentation.
- pytest Development Team (n.d.). pytest Documentation. Available at: https://docs.pytest.org/en/stable/.
- World Wide Web Consortium (W3C) (2024). Web Content Accessibility Guidelines (WCAG) 2.2. Available at: https://www.w3.org/TR/WCAG22/.
- W3C Web Accessibility Initiative (n.d.). Complex Images. Available at: W3C WAI documentation.
22. Completion and verification record
| Field | Required record |
|---|---|
| Figure identifier | Figure and revision |
| Source artifact | Dataset identity, version, and checksum |
| Variable semantics | Scientific quantity, observational unit, and sign convention |
| Unit compatibility | Pass, Fail, or Not Tested |
| Conversion arithmetic | Pass, Fail, or Not Tested |
| Uncertainty conversion | Pass, Fail, or Not Tested |
| Scale-domain validity | Pass, Fail, or Not Tested |
| Axis limits and clipping | Pass, Fail, or Not Tested |
| Baseline appropriateness | Pass, Fail, or Not Tested |
| Sign preservation | Pass, Fail, or Not Tested |
| Temporal/spatial reference | Pass, Fail, Not Tested, or Not Applicable |
| Numerical reconciliation | Pass, Fail, or Not Tested |
| Renderer verification | Pass, Fail, or Not Tested |
| Accessibility | Pass, Fail, or Not Tested |
| Reproducibility | Pass, Fail, or Not Tested |
| Scientific review | Pass, Fail, or Not Tested |
| Reviewer | Actual reviewer and date |
| Evidence artifacts | Source data, numerical tests, scale specifications, figures, and hashes |
| Outstanding limitations | Unresolved scientific or implementation concerns |
Completion criterion: Axis scales and measurement units are validated when authoritative source quantities are correctly identified, transformations and conversions are numerically reproducible, plotting limits and baselines preserve the intended relationships, uncertainty and sign are communicated appropriately, and applicable rendering, accessibility, and scientific review requirements are satisfied.
Scientific limitation: Correct scales and units improve scientific integrity but cannot independently establish measurement validity, representative sampling, appropriate statistical inference, or scientifically justified causal conclusions.
Current implementation status: Scientific validation methodology, numerical reference module, deterministic plotting examples, negative tests, and proposed acceptance requirements documented. No specific Sustainable Catalyst unit registry, axis renderer, numerical validation service, or publication integration is certified without implementation-specific source audit, executed tests, runtime inspection, and release-specific acceptance evidence.
