🌍 Public
Viewing a saved revision (read-only)
4c7c6a7f56a84b408a360eb93ddf0165
Responsive Axis Labels
This example shows a scatter plot with clearly labeled axes, where the x-axis label sits below the axis and the y-axis label is rotated vertically to the left. The code uses d3's `scaleLinear` for both scales, `axisBottom` and `axisLeft` to render the ticks, and custom `text` elements for the labels. It sets explicit offsets for the labels to control their position relative to the axes.
AI-generated descriptionAdding labels to our X and Y axes with D3.