Display an XY area graph view (if possible).
An XY area graph plots the values of one series or column against another. It is similar to a XY line, but with the region between the line and the zero horizontal axis filled.
(Note that XY area graphs are typically employed only when data along the horizontal axis are ordered.)
There must be at least two series or columns to create an XY area graph. By default, the first series or column will be located along the horizontal axis, with the remaining data on the vertical axis. You may optionally choose to plot the data in pairs, where the first two series or columns are plotted against each other, the second two series or columns are plotted against each other, and so forth, or to construct graphs using all possible pairs (or the lower triangular set of pairs).
Syntax
xyarea(options) o1 o2 [o3 ... ]
object_name.xyarea(options)
where o1, o2, ..., are series or group objects.
Options
Scale options
a (default) | Automatic single scale. |
b | Plot series or columns in pairs (the first two against each other, the second two against each other, and so forth). |
d | Dual scaling with no crossing. |
x | Dual scaling with possible crossing. |
n | Normalized scale (zero mean and unit standard deviation). |
ab=type | Add axis border along data scales, where type may be “hist” or “h” (histogram), “boxplot” or “b”, “kernel” or “k”. (Note: axis borders are not available for panel graphs with “panel=” options that involve summaries: mean, median, etc.) |
Multiple series pair options (categorical graph settings will override these options)
m | Plot areas in multiple graphs. |
s | Stacked graph. Each line represents the cumulative total of the series or columns listed. The difference between lines corresponds to the value of a series or column. |
Template and printing options
o=template | Use appearance options from the specified template. template may be a predefined template keyword (“default” - current global defaults, “classic”, “modern”, “reverse”, “midnight”, “spartan”, “monochrome”) or a graph in the workfile. |
t=graph_name | Use appearance options and copy text and shading from the specified graph. |
b / -b | [Apply / Remove] bold modifiers of the base template style specified using the “o=” option above. |
w / -w | [Apply / Remove] wide modifiers of the base template style specified using the “o=” option above. |
reset | Resets all graph options to the global defaults. May be used to remove existing customization of the graph. |
p | Print the graph. |
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
Panel options
The following option applies when graphing panel structured data:
panel=arg (default taken from global settings) | Panel data display: “stack” (stack the cross-sections), “individual” or “i” (separate graph for each cross-section), “combine” or “c” (combine cross-section graphs in a single frame), “mean” (plot means across cross-sections), “median” (plot median across cross-sections). (Note: more general versions of these panel graphs may be constructed as categorical graphs.) |
Examples
Basic examples
xyarea income sales
displays an XY-area graph with INCOME on the horizontal and SALES on the vertical axis.
group g1 income sales
g1.xyarea
plots the same graph using the named object G1.
g1.xyarea(ab=boxplot, t=gr1)
displays the graph with boxplots along the axes, using the template settings from the graph GR1.
Panel examples
g1.xyarea
displays an XY-area graph for the stacked panel data.
g1.xyarea(panel=individual)
displays XY-area graphs for each cross-section in separate graph frames.
g1.xyarea(panel=mean)
computes means for each period across cross-sections, then displays the XY-area graph for the mean data in a single graph frame. Note that only in a very narrow set of circumstances is this latter command likely to yield a sensible graph.
Cross-references
scat and
xyline are specialized forms of XY graphs.
See
“Graphing Data” for a detailed discussion of graphs in EViews, and
“Templates” for a discussion of graph templates.
See
Graph::graph for graph declaration and other graph types.