scatter
Creates dots in an axes and returns handles of the dots.
Syntax
h = scatter(x, y)
h = scatter(..., color)
h = scatter(..., style)
h = scatter(..., property, value, ...)
h = scatter(hAxes, ...)
Inputs
- x,y
- Range of the x and y axes.
- color
- Color of the scattered dots.
- style
- Style of the scattered dots.
- property
- Properties that control the appearance or behavior of the graphics object.
- value
- Value of the properties.
- hAxes
- Axis handle. .
Outputs
- h
- Handle of the scatter graphics object.
Examples
clf;
x = rand(1, 100);
y = rand(1, 100);
s = scatter (x, y);
clf;
x = rand(1, 100);
y = rand(1, 100);
s = scatter (x, y, 10, 'gv', 'filled');
Comments
If there is no axes, one will be created first. Takes optional arguments to control the dots style. It can be either the size of the dots (not supported yet), or the color of the dots (not supported yet), or the style of the dots, or “filled...not supported yet), or property/value pair(s), or all of them. If the first argument of scatter() is an axes handle, lines will be created in that axes.