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: graph combine with (non-standard) one legend

From   Maarten Buis <>
Subject   Re: st: graph combine with (non-standard) one legend
Date   Fri, 14 Jun 2013 15:32:16 +0200

On Fri, Jun 14, 2013 at 3:08 PM,  S. Jenkins wrote:
> "I've got 3 Stata graphs which will all have the same legend. I'd like
> to display them in a 2x2 array, with the graphs in 3 of the cells and
> the legend on its own in the fourth.

Here is a solution that works if you can use the -by()- option to
create these three graphs:

*------------------ begin example ------------------
sysuse auto
recode rep78 1/2=3
separate price, by(foreign)
twoway scatter price1 price2 mpg, ///
       by(rep78, legend(at(4) pos(0)))
*------------------- end example -------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

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