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]

From |
Friedrich Huebler <fhuebler@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Different graph height with graph, by() |

Date |
Wed, 15 Sep 2010 10:16:49 -0400 |

Thank you, Kieran. Your commands produce the kind of graph I have in mind. How did you obtain the values for the fysize() option? How would one identify the right fysize() values for a graph with more by-groups, as in the example below? Is this a matter of trial and error? graph bar mpg, by(rep78, col(1)) ysize(10) Friedrich On Tue, Sep 14, 2010 at 7:42 PM, Kieran McCaul <Kieran.McCaul@uwa.edu.au> wrote: > > 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/

**Follow-Ups**:**RE: st: RE: Different graph height with graph, by()***From:*"Kieran McCaul" <Kieran.McCaul@uwa.edu.au>

**Re: st: RE: Different graph height with graph, by()***From:*Scott Merryman <scott.merryman@gmail.com>

**References**:**st: Different graph height with graph, by()***From:*Friedrich Huebler <fhuebler@gmail.com>

**st: RE: Different graph height with graph, by()***From:*"Kieran McCaul" <Kieran.McCaul@uwa.edu.au>

- Prev by Date:
**Re: st: Is it necessary to have some variable for exposure in xtnbreg** - Next by Date:
**Re: st: R: Estimating the number of workers in each industry in each district - flag: Stata 9/2 SE** - Previous by thread:
**st: RE: Different graph height with graph, by()** - Next by thread:
**Re: st: RE: Different graph height with graph, by()** - Index(es):