FUNCTION REFERENCE
scatter3
3-D scatter plot.
3-D scatter plot.
Syntax
scatter3(x, y, z)Syntax
scatter3(x, y, z, sz)Syntax
scatter3(x, y, z, sz, c)Syntax
scatter3(..., 'filled')Syntax
scatter3(..., marker)Syntax
scatter3(ax, ...)Syntax
h = scatter3(...)Draws a marker at each point (x, y, z). sz is a scalar or per-point vector of marker areas in points^2 ([] keeps the default); c is a color name, RGB triplet, n-by-3 RGB matrix, or n-element vector mapped through the axes colormap and CLim, as for scatter. 'filled' fills the markers; marker is a symbol such as 'd' or '^'. Name-value pairs such as 'MarkerEdgeColor' and 'MarkerFaceAlpha' follow. Markers outside XLim, YLim or ZLim are not drawn.
With hold off the axes switches to view(3); with hold on the current view is kept.
Errors: "scatter3: not enough input arguments; X, Y and Z are required"; x, y and z follow the plot3 size rules and texts (with scatter3: in front). A line style such as 'r-o' is rejected with "scatter/bar support a single color letter; full line specs require plot"; give a color letter, a marker and 'filled' separately.
Example
scatter3([1 2 3], [3 1 2], [0 1 2], 36, 'r', 'filled') % three red markersDifferences from MATLAB: Real coordinates only.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.