Creating a scatterplot chart

A scatterplot or scattergraph is another common type of diagram used to display data points on Cartesian coordinates with two different variables. Scatterplot is especially useful when you're exploring the problem of spreading, clustering, and classification. In this recipe, you will learn how to implement a multi-series scatterplot chart in D3.

Getting ready

Open your local copy of the following file in your web browser:

https://github.com/NickQiZhu/d3-cookbook-v2/blob/master/src/chapter8/scatterplot-chart.html

How to do it...

A scatterplot is another chart that uses Cartesian coordinates. Thus, a large part of its implementation is very similar to the charts we introduced so far; and therefore, the code concerning ...

Get Data Visualization with D3 4.x Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.