ScatterPlotMatrix

A scatterplot matrix. This visualization will display a scatterplot for every pair of specified fields, arranged in a grid. Additional fields may determine the size, color, and shape of the points.

This component can be found in the candela/plugins/vega plugin.

Example

JavaScript

<body>
<script src="//unpkg.com/candela/dist/candela.min.js"></script>
<script>
  var el = document.createElement('div')
  document.body.appendChild(el);

  var data = [];
  for (var d = 0; d < 10; d += 1) {
    data.push({
      a: d,
      b: 10 - d,
      name: d
    });
  }

  var vis = new candela.components.ScatterPlotMatrix(el, {
    data: data,
    fields: ['a', 'b']
  });
  vis.render();
</script>
</body>

Python

import pycandela

data = [{'a': d, 'b': 10 - d, 'name': d} for d in range(10)]

pycandela.components.ScatterPlotMatrix(data=data, fields=['a', 'b'])

R

library(candela)

candela('ScatterPlotMatrix', data=mtcars, fields=c('mpg', 'wt', 'disp'))

Options

data (Table)
The data table.
fields (Array of String)
The fields to use as axes in the scatterplot matrix. Specifying N fields will generate an N-by-N matrix of scatterplots.
color (String)
The field used to color the points.
colorType (String)
The data type for the color field. The default is "nominal".
size (String)
The field used to size the points.
sizeType (String)
The data type for the size field. The default is "quantitative".
shape (String)
The field used to set the shape of the points.
shapeType (String)
The data type for the shape field. The default is "nominal".
filled (String)
Whether to fill the points or just draw the outline. The default is true.
width (Number)
Width of the chart in pixels. See Sizing.
height (Number)
Height of the chart in pixels. See Sizing.
renderer (String)
Whether to render in "svg" or "canvas" mode (default "canvas").