Stata 15 help for gr7bar

help gr7bar (out-of-date command) -------------------------------------------------------------------------------


This help file documents the old version of Stata's graph command. See graph for the modern version.

Stata runs the old version of graph whenever graph is invoked under version control (see version) or when you use the graph7 or gr7 command.

Graph bar charts (graph7, bar command)

{graph7 | gr7} [varlist] [weight] [if exp] [in range], bar [common_options [no]alt means stack]

common_options See help ------------------------------------------------------ title and axes options gr7axes symbol and line options gr7sym color and shading options gr7color saving, printing, & multiple image options gr7other ------------------------------------------------------

by is allowed; see by.


graph7 ... , bar ... specifies a bar chart. Sums or means (see means option below) of the variables determine the height of the bars. For an introduction to graph7, see graph7.

Options unique to bar

[no]alt forces the labeling of groups to be on single or multiple lines. graph7 chooses whether the text labeling each box should be on the same line or instead alternative between two lines. If you do not like graph7's choice, [no]alt allows you to enforce your preferences. alt forces the staggered look whereas noalt forces the single-line approach.

means scales the bars according to the means of the variables rather than their sums. "graph7 cost revenue, bar by(region)" graphs total cost and revenues for each region. "graph7 cost revenue, bar by(region) means" graphs average cost and revenues.

stack stacks the bars for each variable rather than placing them side-by-side.


. graph7 a b c, bar . graph7 a b c, bar means . graph7 a, bar by(category) . graph7 a b, bar by(category) stack

. graph7 labor parts advert oh, bar by(year) shading(3124) ylabel yline ti("Costs by Fiscal Year") l1("(Thousands of Dollars)")

Also see

The eight graph7 types are specified as options. The other seven types are

Option Graph type See help ---------------------------------------------------- histogram histogram gr7hist twoway Two-way scatterplot gr7twoway matrix Two-way scatterplot matrix gr7matrix oneway One-way scatterplot gr7oneway box Box-and-whisker plot gr7box star Star chart gr7star pie Pie chart gr7pie ----------------------------------------------------

Help: [G-2] graph7, gr7axes, gr7color, gr7other, gr7sym; [R] histogram

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index