Skip to content

scatter

plot · scripts/plot/draw/scatter.m

: scatter (x, y)
: scatter (x, y, s)
: scatter (x, y, s, c)
: scatter (…, "filled")
: scatter (…, marker)
: scatter (…, prop, val)
: scatter (ax, …)
: h = scatter (…)

Draw a scatter plot of markers.

x and y are vectors of equal length. The optional marker area s (in square points, default 36) may be a scalar or have one value per point. The colour c is a colour letter, an RGB triple, an n-by-3 matrix of RGB rows or a vector of values mapped through the colormap; by default the first colour of the axes colour order is used. "filled" fills the markers.

The return value is one group object with the properties XData, YData, SizeData, CData, Marker and MarkerFaceColor.