Object Reference : Graph Creation Commands
  
 
xybar
Display an XY bar graph view (if possible).
An XY bar graph displays the data in sets of three series or columns as a vertical bar. For a given observation, the values in the first two series or columns define a region along the horizontal axis, while the value in the third series or column defines the vertical height of the bar.
XY bar graphs may, for example, be used to construct variable width histograms.
Syntax
xybar(options) o1 o2 [o3 ... ]
object_name.xybar(options)
where o1, o2, ..., are series or group objects.
Options
 
n
Normalized scale (zero mean and unit standard deviation).
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 in single graph 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
xybar lowbin highbin height
plots an XY-bar graph using LOWBIN and HIGHBIN to define the bin ranges and HEIGHT to draw the corresponding bar height.
group g1 lowbin highbin height
g1.xybar
plots the same graph using the named object G1.
g1.xybar(t=t1)
displays the graph using the template settings from the graph object T1.
Panel examples
g1.xybar(panel=individual)
displays an XY-bar graph for each cross-section in an individual graph frame.
g1.xybar(panel=mean)
displays an XY-bar graph for the data formed by taking means across cross-sections for each period. Note that only in a very narrow set of circumstances is this latter command likely to yield a sensible graph.
Cross-references
scat, xyarea, xyline, and xypair 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.