Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
Ddev-snip
Last edited Aug 22, 2019
Created on Aug 19, 2019
Forked from Customizing Axes

This example demonstrates how to customize axes in D3, plotting automobile horsepower against weight from the auto-mpg dataset. The scatterplot uses d3.scaleLinear with .nice() to smooth domain extents, while d3.axisBottom and d3.axisLeft are configured with tickSize to create gridlines. Tick labels are formatted using d3.format, replacing "G" with "B" for billions. The SVG rendering includes removing default domain paths, adding axis labels and a title, with styled circles and text via CSS.

AI-generated description
MIT Licensed

Similar vizzes