liveBook · Manning

Scales section

As explained in Data Storytelling with Altair and AI

A scales section is the part of a Vega specification that defines mappings from data domains to visual ranges.

A scales section defines how data domains become visual ranges. Each scale names the mapping and typically specifies its type, domain, and range. section 3.1.1

A practical scales section connects data fields to chart dimensions:

  • Take each domain from a named data source and field. section 3.1.1

How Data Storytelling with Altair and AI covers it

How deep it goes
Defines scale names, types, domains, and ranges through a concrete two-scale configuration.
Examples
Uses xScale and yScale to map myData fields x and y to chart width and height.
What it assumes
Assumes a Vega specification with data sources and introduces domain-to-range mapping through a basic JSON structure.
What you can do after
Operate/configure Vega scales by assigning named domains, scale types, and visual ranges.
How it connects
Connects data sources and fields with axes and marks through named scales.

Related concepts

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.