plotScatter

Purpose

Creates a 2-dimensional scatter plot.

Format

plotScatter([myPlot, ]x, y)
Parameters:
  • myPlot (struct) – Optional argument, a plotControl structure.
  • x (Nx1 or NxM matrix) – Each column contains the X values for a particular data point.
  • y (Nx1 or NxM matrix) – Each column contains the Y values for a particular data point.

Examples

// Create random normal data
x = rndn(50, 1);

// Reverse the order of 'x' and set it to be the 'y' value
y = rev(x);

// Plot the data
plotScatter(x, y);

See also

Functions plotXY(), plotLogLog(), plotBox(), plotHistP()