line | Command || Coef View | Graph Command | Group View | Matrix View | Series View | Sym View | Vector View |

Display a line graph view.

Syntax

line(options) o1 [o2 o3 ... ]

object_name.line(options) [categorical_spec(arg)]

where o1, o2, ..., are series or group objects. Following the line keyword, you may specify general graph characteristics using options. Available options include multiple graph handling, dual scaling, template application, data contraction, adding axis extensions, and rotation.

Options

Scale options

a (default) | Automatic single scale. |

d | Dual scaling with no crossing. The first series or column is scaled on the left and all other series or columns are scaled on the right. |

x | Dual scaling with possible crossing. See the “d” option. |

n | Normalized scale (zero mean and unit standard deviation). May not be used with the “s” option. |

rotate | Rotate the graph so the observation axis is on the left. |

ab=type | Add axis border along data scale, 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.) |

wf | Use workfile frequency for linked series. |

Multiple series options (categorical graph settings will override these options)

m | Plot lines in multiple graphs (will override the “s” option). |

s | Stacked line 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.

Graph data options

The following option is available in non-panel or categorical graph settings:

contract=key | Contract the data as specified by key, where key may be: “mean”, “median”, “max”, “min”, “sum”, “var” - variance, “sd” - standard deviation, “sumsq” - sum of the squared values, “skew” - skewness, “kurt” - kurtosis, “nas” - number of missing values, “obs” - number of observations, “unique” - error if the series is not identical for all observations in a given group, “first” - first observation in category using workfile order, “last” - last observation in category using workfile order, “quant(quantile)” - where quantile is a number between 0 and 1. |

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), “mean1se” (plot mean and +/- 1 standard deviation summaries), “mean2sd” (plot mean and +/- 2 s.d. summaries), “mean3sd” (plot mean and +/- 3 s.d. summaries), “median” (plot median across cross-sections), “med25” (plot median and +/- 0.25 quantiles), “med10” (plot median and +/- 0.10 quantiles), “med05” (plot median +/- 0.05 quantiles), “med025” (plot median +/- 0.025 quantiles), “med005” (plot median +/- 0.005 quantiles), “medmxmn” (plot median, max and min). (Note: more flexible versions of the non-s.d. and on-quantile graphs may be constructed as categorical graphs.) |

Categorical graph options

These options only apply to categorical graphs (“Categorical Spec”) where the graph has one or more within factors and a contraction method other than raw data (see the contract option above).

favorlegend | Favor the use of legends over axis labels to describe categories. |

elemcommon = int | Specifies the number of within factors for which the graph uses common area colors. For example, with multiple within dimensions, if “elemcommon=1”, then only categories defined by the first within factor will have common colors. If “elemcommon=2”, then categories defined by the first two within factors will have common colors. If “elemcommon=0”, all areas will have different colors. The default is one less than the number of within factors. |

Examples

Basic examples

line gdp cons m1

displays line graphs of the series GDP, CONST, and M1.

group g1 gdp cons m1

g1.line(d)

plots line graphs of the three series in group G1 with dual scaling (no crossing). The latter two series will share the same scale.

g1.line(m)

plots line graphs of the three series in group G1, with each plotted separately.

g1.line(o=midnight, b, w)

creates a line graph of the group G1, using the settings of the predefined template “midnight”, applying the bold and wide modifiers.

gdp.line(ab=boxplot)

displays the line graph with a boxplot displayed along the data dimension.

Panel examples

ser1.line(panel=individual)

displays area graphs with a separate graph for each cross-section, while,

ser1.line(panel=mean)

displays a line graph of the means for each period computed across cross-sections.

Categorical spec examples

ser1.line across(firm, dispname)

displays a categorical line graph of SER1 using distinct values of FIRM to define the categories, and displaying the resulting graphs in multiple frames using the display name in the labels.

ser1.line across(firm, dispname, iscale)

shows the same graph with individual scaling for each of the frames.

Cross-references

See “Graphing Data” for a detailed discussion of graphs in EViews, and “Templates” for a discussion of graph templates. See Graph::graphfor graph declaration and other graph types.