Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Different graph height with graph, by()


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Different graph height with graph, by()
Date   Tue, 14 Sep 2010 19:04:52 -0400

Is it possible to have graphs of different height with -graph, by()-?
In the example below, two bar graphs are placed on top of each other.
The upper bar has a height of 20, the lower bar a height of 25. The
y-axis for the upper and lower graphs has the same range, from 0 to
25, and the graphs themselves have the same height.

. sysuse auto
. graph bar mpg, by(foreign, col(1)) name(a)

Can the absolute height of the upper graph be reduced so that the
scale only ranges from 0 to 20? In other words, can the area between
20 and 25 in the upper graph be cut while keeping the other components
of the graph unchanged?

The following command changes the scale but not the absolute height of
the upper graph. In the upper graph, the absolute distance between 0
and 20 on the y-axis is now the same as the distance between 0 and 25
in the lower graph and the distance between 0 and 5 in the upper graph
is greater than the distance between 0 and 5 in the lower graph.

. graph bar mpg, by(foreign, col(1) yrescale) name(b)

I am looking for a way to reduce the height of the upper graph while
keeping the distance between the ticks of the y-axis identical in the
upper and lower graph. Can this be done in Stata?

Thanks,

Friedrich
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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