Skip to main content

Scatter Plot

A scatter plot.

Options#

  • data | object (required): object of value arrays for each variable. Default: none.
  • xval | string (required): variable to display on the x-axis. Default: none.
  • yval | string (required): variable to display on the y-axis. Default: none.
  • text | (string|Factor): texts to be displayed next to each point. Default: none.
  • color | (string|Factor): categorical variable to map to color of points. Default: none.
  • type | (string|Factor): categorical variable to map to the displayed symbols. Default: none.
  • size | string: quantitative variable to map to the size of the points. Default: none.
  • regressionLine | boolean: controls whether to overlay regression line(s). Default: false.
  • regressionMethod | array<string>: linear and/or smooth to display linear regression and smoothed LOWESS regression line. Default: [ 'linear' ].
  • lineBy | (string|Factor): display separate regression line for each category of specified categorical variable. Default: none.
  • smoothSpan | number: smoothing span parameter for smooth regression line. Default: 0.66.

Examples#

Live Editor
Result
Last updated on by Planeshifter