CoppeliaScatterPlotChangingGroups

by Simon Raper

CSS

circle {
    fill: #1ABC9C;
}
.axis path, .axis line {
    fill: none;
    stroke: black;
    shape-rendering: crispEdges;
}
.axis text {
    font-family: sans-serif;
    font-size: 11px;
}

JavaScript

//Add data
var dataset = [
    [11.5462501778036, 11.0705049744015, 0.131821772674699, 1, 0],
    [3.67071492839681, 6.24554630319451, 0.15058209460401, 1, 0],
    [9.81323740393551, 12.3643377586529, 0.120815538727491, 1, 0],
    [11.9887437283958, 6.05067182981825, 0.145521387054054, 1, 0],
    [16.2925601755468, 4.85638420893092, 0.0854465097603726, 1, 0],
    [10.0416802119047, 5.57413970469026, 0.152602977928622, 1, 0],
    [10.9248628808425, 11.1568696888753, 0.137432987432315, 1, 0],
    [11.6157430188091, 7.00436998875104, 0.14581580138568, 1, 0],
    [5.66926140500181, 5.66170081395184, 0.148548850784061, 1, 0],
    [10.4781949119449, 4.27858609207664, 0.149383645175068, 1, 0],
    [11.2093944772194, 10.9387651096946, 0.126587612515242, 1, 0],
    [10.3535756961258, 13.013153950094, 0.103914939938889, 1, 0],
    [14.4873154114975, 8.98142217080989, 0.095488796372146, 1, 0],
    [8.53202143906703, 17.8340192744078, 0.130210451464605, 1, 0],
    [9.38319509790025, 11.5027457951033, 0.133846622595174, 1, 0],
    [10.3709858096265, 6.69712198423751, 0.144927348552847, 1, 0],
    [13.1095245616508, 15.1806766808631, 0.0873520761192208, 1, 0],
    [3.24535491515545, 11.1176123474672, 0.154461796455211, 1, 0],
    [7.84894316686801, 7.38018983243937, 0.153648783954188, 1, 0],
    [8.73442560509599, 12.3190518685744, 0.120812110542288, 1, 0],
    [7.96761031062942, 7.9777253264568, 0.150091214449363, 1, 0],
    [10.251532412348, 15.163598568284, 0.0923889896983789, 1, 0],
    [7.42178745691122, 9.39702286761151, 0.154086192105098, 1, 0],
    [9.6138802583684, 10.8556242366183, 0.135647989548262, 1, 0],
    [11.4756857382627, 9.29371342564631, 0.145805453251149, 1, 0],
    [8.25256902689512, 5.13899827971801, 0.148661085648346, 1, 0],
    [12.6907385700873, 7.72608184557092, 0.138233153794542, 1, 0],
    [7.8392355333367, 15.3691227287094, 0.119498992539885, 1, 0],
    [11.7529946323555, 14.2029643409799, 0.082531381556205, 1, 0],
    [12.7439247398177,...