Bookmark and Share

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

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

Re: st: space between plots when using "graph combine"

From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: space between plots when using "graph combine"
Date   Sun, 18 Sep 2011 15:42:25 -0400

Maria Ana Vitorino <[email protected]>:
Why not just
gr combine fig1 fig2 fig2 fig1, name(figcombo, replace) xsize(10) ysize(10)

On Sun, Sep 18, 2011 at 12:36 PM, Maria Ana Vitorino
<[email protected]> wrote:
> I have a question regarding the graph regions. I have 4 square plots that I
> want to put in the same figure. If we look at the plots individually, the
> figures are square (including the margins around the plot itself). But when
> I combine them the areas around the plots become rectangles.  Below is an
> example (I used colors so that it's easier to see what I'm trying to
> explain). Any suggestions on how to make the final combined plot also a
> square without wasting so much space to the left and to the right of the
> plots?
> Thanks!
> Ana
> sysuse auto, clear
> scatter mpg weight, aspect(1) xsize(5) ysize(5) graphregion(color(erose))
> plotregion(margin(zero)) name(fig1, replace)
> scatter mpg weight, aspect(1) xsize(5) ysize(5) graphregion(color(blue))
> plotregion(margin(zero)) name(fig2, replace)
> graph combine  fig1 fig2 fig2 fig1, saving(figcombo,  replace)

*   For searches and help try:

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