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]
Re: st: RE: graph combine & single legend
From
Eleonora Paesen <[email protected]>
To
[email protected]
Subject
Re: st: RE: graph combine & single legend
Date
Fri, 23 Sep 2011 14:01:52 +0100
Hi Nick,
I couldn't find grc1legwby on your website.
Is it already available?
Thanks,
Eleonora
On Thu, Sep 22, 2011 at 3:26 PM, Nick Winter <[email protected]> wrote:
> I encountered this issue -- that -grc1leg- does not work fully with graphs
> that were created with the -by()- option -- recently. I've hacked away at
> -grc1leg- to create -grc1legwby- (GRaph Combine 1 LEGend With BY), that will
> work for these plots. It also works with plots that do not use -by-, so it
> can replace -grc1leg-.
>
> I've submitted it for posting to SSC. In the mean time you can get it from
> my web site:
>
> net from http://faculty.virginia.edu/nwinter/progs
>
> Perhaps this command also wins some sort of award for its terrible name...
>
> All best,
> Nick Winter
>
>
>> From: [email protected]
>> [[email protected]] On Behalf Of Oliver Jones
>> [[email protected]]
>> Sent: Wednesday, September 21, 2011 9:06 AM
>> To: [email protected]
>> Subject: Re: st: RE: graph combine& single legend
>>
>> Hi,
>> I have the same problem as Ricardo.
>> I tried using the -grc1leg- command, but I can not figure out how to use
>> it.
>> I always end up with all the legends for every graph and an additional one
>> from using -grc1leg-.
>> Thus my questions is: How do I create one single legend?
>>
>> The code I use is something like this:
>>
>> ************** Beginn example ****************
>> sysuse xtline1, clear
>>
>> * Creating two more variable to mimic my data setup
>> gen cal_yesterday = L.calories
>> bysort person: gen first_half_year = (_n< 175)
>>
>> * Draw three scater plots
>> scatter cal_yesterday calories day if person == 1, ///
>> by(first_half_year, title("Tess")) ///
>> name(g1)
>> scatter cal_yesterday calories day if person == 2, ///
>> by(first_half_year, title("Sam")) ///
>> name(g2)
>> scatter cal_yesterday calories day if person == 3, ///
>> by(first_half_year, title("Arnold")) ///
>> name(g3)
>>
>> * combine the three scatter plots
>> grc1leg g1 g2 g3
>> *************** End example *****************
>>
>>
>> Kind regards
>> Oliver
>>
>> Am 19.09.2011 19:10, schrieb Fiedler, James (JSC-SK)[USRA]:
>>>
>>> You might try the user-written command -grc1leg- (since 1's often look
>>> like l's, that's "grc" + the numeral 1 + "leg").
>>>
>>> James
>>>
>>> ________________________________________
>>> From: [email protected]
>>> [[email protected]] On Behalf Of Ricardo Ovaldia
>>> [[email protected]]
>>> Sent: Monday, September 19, 2011 11:19 AM
>>> To: [email protected]
>>> Subject: st: graph combine& single legend
>>>
>>> I want to combine 4 graphs, each a plot of three lines, using -graph
>>> combine-. Because the legend for the graphs are all the same, I would like
>>> to have a single legend at the bottom. When I use -legend(off)- for three of
>>> the graphs, and leave the legend for the 4th graph, this 4th graph is
>>> smaller than the rest when I combine them. Any solutions will be
>>> appreciated.
>>>
>>> Thank you in advance,
>>> Ricardo.
>>>
>>> Ricardo Ovaldia, MS
>>> Statistician
>>> Oklahoma City, OK
>>>
>>> *
>>> * 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/
>>
>> --
>> Universität Bielefeld
>> Fakultät für Wirtschaftswissenschaften
>> Lehrstuhl für Ökonometrie und Statistik
>> - -
>> Bielefeld University
>> Faculty of Business Administration and Economics
>> Chair of Econometrics and Statistics
>> - -
>> Raum / room: V9-110
>> Tel / phone: +49 (0)521 106 4871
>> - -
>> http://www.wiwi.uni-bielefeld.de/oekonometrie.html
>> ---
>> *
>> * 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/
>
> --
> --------------------------------------------------------------
> Nicholas Winter 434.924.6994 t
> Associate Professor 434.924.3359 f
> Department of Politics [email protected] e
> University of Virginia faculty.virginia.edu/nwinter w
> S385 Gibson Hall, South Lawn
> *
> * 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/