I’m looking for an example of how to draw a scatterplot in D3.js.
I haven’t been able to find a simple example by looking through the official D3.js examples (impressive though they are). I just want to know how to:
- draw and label the x- and y-axes
- draw scatter points on the graph.
I did find this example in this D3 reusable library, but it is much more complex than I need, with external files that make it hard to pull out the essential points. Could anyone point me at a simple scatterplot example to get started?
Thanks very much.
This should get you started. You can see it in action at http://bl.ocks.org/2595950.
Used like this: