Graphics |

The `area`

function displays curves generated from a vector or from separate columns in a matrix. `area`

plots the values in each column of a matrix as a separate curve and fills the area between the curve and the *x*-axis.

**Area Graphs Showing Contributing Amounts**

Area graphs are useful for showing how elements in a vector or matrix contribute to the sum of all elements at a particular *x* location. By default, `area`

accumulates all values from each row in a matrix and creates a curve from those values.

displays a graph containing three area graphs, one per column.

The height of the area graph is the sum of the elements in each row. Each successive curve uses the preceding curve as its base.

**Displaying the Grid on Top.** To display the grid lines in the foreground of the area graph and display only five grid lines along the *x*-axis, use the statements

Overlaying Plots on Bar Graphs | Comparing Data Sets with Area Graphs |

© 1994-2005 The MathWorks, Inc.