FUNCTION REFERENCE

scatter

Scatter plot.

Scatter plot.

Syntax

scatter(x, y)

Syntax

scatter(x, y, sz)

Syntax

scatter(x, y, sz, c)

Syntax

scatter(..., 'filled')

Syntax

scatter(..., marker)

Syntax

scatter(ax, ...)

Syntax

h = scatter(...)

Draws a marker at each point (x, y). sz is a scalar or per-point vector of marker areas in points^2 ([] keeps the default). c is a color name or RGB triplet, an n-by-3 matrix of RGB triplets, or an n-element vector mapped through the axes colormap and CLim. 'filled' sets MarkerFaceColor to 'flat'; marker is a symbol such as 'o', 's', 'd', or '^'. Name-value pairs and object properties include XData, YData, SizeData, CData, Marker, MarkerFaceColor ('none', 'flat', 'auto', or RGB), MarkerEdgeColor ('none', 'flat', or RGB), MarkerFaceAlpha, MarkerEdgeAlpha, and LineWidth.

Example

scatter([1 2 3], [2 4 3], [20 40 60], [1; 2; 3], 'filled')   % three markers with per-point size and color

Differences from MATLAB: Real coordinates only; no extra datasets in one call.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.