liveBook · Manning

Axes section

As explained in Data Storytelling with Altair and AI

An axes section is the part of a Vega specification that defines chart axes, including their scales, orientations, tick marks, and labels.

An axes section defines a chart’s axes, connecting each axis to a scale and positioning it with an orientation. Axes provide tick marks and labels that make encoded values readable. section 3.1.1

A two-axis chart

A basic Vega specification defines one bottom axis for xScale and one left axis for yScale: { "axes": [ { "orient": "bottom", "scale": "xScale" }, { "orient": "left", "scale": "yScale" } ] }. The referenced scales map data domains to visual ranges.

How Data Storytelling with Altair and AI covers it

How deep it goes
Specifies axes as a list requiring a scale and orientation, without detailing broader axis customization.
Examples
Uses bottom and left axes named xScale and yScale in a two-axis line-chart specification.
What it assumes
Assumes familiarity with Vega JSON structure and named scales that map data domains to visual ranges.
What you can do after
Build a basic Vega chart by assigning named scales to oriented axes.
How it connects
Links axes to scales, data domains, visual ranges, and marks that encode chart values.

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.