plotAddScatter#
Purpose#
Adds a 2-dimensional scatter plot to an existing graph.
Format#
- plotAddScatter([myPlot, ]x, y)#
- Parameters:
myPlot (struct) – Optional argument. A
plotControlstructure.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.
Remarks#
plotAddScatter() may only add a scatter plot to 2-D graphs.
This function will not change any of the current graph’s settings other than to resize the view as necessary to display the new curve.
Examples#
// Create first set of scatter data
x1 = rndn(50, 1);
y1 = rndn(50, 1);
// Create initial scatter plot
plotScatter(x1, y1);
// Add a second set of points
x2 = rndn(30, 1) + 2;
y2 = rndn(30, 1) + 2;
plotAddScatter(x2, y2);
See also
Functions plotAddBar(), plotAddHist(), plotAddHistF(), plotAddHistP(), plotAddScatter(), plotAddXY()