Scatterplot
This scatterplot visualizes the relationship between distance from the center of the contiguous United States and the cost of a 20-minute, 10-mile ride for various cities. Each point is colored blue and includes a tooltip showing the city name and exact values on hover. The code loads data from a TSV file using `d3.csv`, scales the x and y axes with `d3.scale.linear`, and computes domains with `d3.extent`. It renders SVG circles, axes via `d3.svg.axis`, and uses `d3.scale.category10` for legend colors.
AI-generated descriptionThis scatterplot is constructed from a TSV file storing the dimensions of sepals and petals of various iris flowers. The chart employs conventional margins and a number of D3 features:
- d3.tsv - load and parse data
- d3.scale.linear - x- and y-position encoding
- d3.scale.ordinal - color encoding
- d3.extent - compute domains
- d3.svg.axis - display axes
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3887118'>Scatterplot</a>
forked from <a href='http://bl.ocks.org/xaranke/'>xaranke</a>'s block: <a href='http://bl.ocks.org/xaranke/ca3a852e218ac517f00a'>Scatterplot</a>