A point scale places discrete values at evenly spaced positions in a continuous range. Unlike a band scale, it has zero bandwidth: it gives each category a position, not a strip of space. Use it when categories mark the centers of box plots, violin plots, or other chart elements. section 6.4.3
Position two box plots
Set the domain to the category names and the range to the chart’s inner width: `const xScale = d3.scalePoint().domain(["Female", "Male"]).range([0, innerWidth]).padding(0.5);` Calling `xScale("Female")` or `xScale("Male")` gives the corresponding horizontal position. Pass the same scale to `d3.axisBottom(xScale)` so the labels align with the plots. section 6.4.3
The `padding()` value controls blank space at both ends of the range. It is a fraction of the step—the distance between adjacent points—rather than a fixed number of pixels. For the two box plots, `0.5` leaves outer padding equal to half a step. section 6.4.3
For violin plots, a point scale spreads roles across the x-axis while linear scales position salaries vertically and determine each violin’s width. The available half-step, `xScale.step() / 2`, can set the maximum width on either side of a role’s center. section 6.5
Place points beyond a horizontal axis
A rankings chart uses one point scale for years across its width and another for ranks down its height. A radial chart maps the twelve months to angles from `0` through `2 * Math.PI - (2 * Math.PI) / 12`; sine and cosine then turn each month’s angle into an axis endpoint. section 8.6.3 section 14.5.1
