liveBook · Manning

Scale

A visualization scale maps data values to visual values such as positions, colors, or sizes.

How 2 Manning books explain it

D3.js in Action, Third Edition

A scale maps data values to visual values such as size, color, or screen position.

How it is used
Translates prepared data into visual attributes while constructing D3 charts.
How deep it goes
Defines domains, ranges, continuous values, and discrete values, then demonstrates scaleLinear without covering every scale family.
Examples
Uses bar charts, TV-series ratings, gendered salary box plots, scatterplots, and a scaleLinear mapping from 0–200 to 0–20.
What you can do after
Apply it via D3 by configuring a domain and range, evaluating the scale, and assigning outputs to chart attributes.

Read how D3.js in Action, Third Edition explains scale →

Data Storytelling with Altair and AI

A visualization scale maps data values to visual values such as positions, colors, or sizes.

How it is used
Maps data values to visual outputs, especially colors, while constructing readable Altair charts.
How deep it goes
Defines domains, ranges, and schemes with examples, but stops short of explaining scale internals.
Examples
Uses category-colored bars, quantitative blue-to-red mappings, and country lines colored with the set2 scheme.
What you can do after
Apply it via Altair to configure color palettes, domains, and ranges for encoded chart values.

Read how Data Storytelling with Altair and AI explains scale →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.