Skip to content

Instantly share code, notes, and snippets.

View ZhengYingqian's full-sized avatar

Jennifer ZhengYingqian

View GitHub Profile
@peterk87
peterk87 / README.md
Last active May 10, 2017 11:46
JS+D3: Zoomable, pannable scatterplot with shift keypress enabled brush multiselect of data points

JS+D3: Zoomable, pannable scatterplot with shift keypress enabled brush multiselect of data points

This JS+D3 gist creates a scatterplot with zooming and panning enabled as well as a brush for selecting or deselecting points using the iris dataset within data.tsv.

The "Get Selection" button gets the current selection of points and prints their ids to the JS console (i.e. console.log(selection);).

The "Clear Selection" button clears the current selection.