area
Creates stacked areas in an axes and returns handles of the areas.
Syntax
h = area(x, y)
h = area(y)
h = area(... property, value, ...)
h = area(hAxes, ...)
Inputs
- x,y
- Range of the x and y axes.
- level
- Base line level of the shading (not supportted yet). The default level is 0.
- property
- Properties that control the appearance or behavior of the graphics object.
- value
- Value of properties.
- hAxes
- Axis handle.
Outputs
- h
- Handle of the area graphics object.
Examples
Simple area example:
clf;
x = [1:5]
y = [x',x',x']
a = area(x,y)
clf;
y = [1:5]
area(y)
Simple area example with line, value and property:
clf;
a=area([1 2 3], [1 3 2], 'facecolor', [217 151 150]);
get(a)
Comments
If there is no axes, one will be created first. If x is omitted, the index of y is used as data to associate with x axis. Area takes optional arguments to control the area style. It can be either base line level (not supported yet), or property/value pair(s), or both.