Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Kieran McCaul" <Kieran.McCaul@uwa.edu.au> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: Different graph height with graph, by() |
Date | Wed, 15 Sep 2010 07:42:26 +0800 |
.... Something like: sysuse auto graph bar mpg if foreign==0, saving(g1, replace) fysize(45) graph bar mpg if foreign==1, saving(g2, replace) fysize(55) graph combine g1.gph g2.gph, cols(1) -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Friedrich Huebler Sent: Wednesday, 15 September 2010 7:05 AM To: statalist@hsphsun2.harvard.edu Subject: st: Different graph height with graph, by() 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/ * * 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/