axis
✓ Published1🌍 Public
This example shows a scatter plot of automobile data from the auto-mpg dataset, with horsepower on the x-axis and weight on the y-axis. Orange semi-transparent circles represent individual cars, while gridlines and axis labels are generated using d3-axis. The code uses d3.csv to load the data, d3.scaleLinear with .nice() for the scales, and d3.extent to set domains. The SVG rendering includes custom margin-based positioning, rotated axis labels, and a title, with axes styled by removing the domain line and adding tick padding.
AI-generated descriptionMIT Licensed