Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: Ang: Re: st: Legend with rows and columns in a line graph


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Ang: Re: st: Legend with rows and columns in a line graph
Date   Mon, 4 Feb 2013 17:48:49 +0000

Otherwise put.

You have 5 lines of legend.

You insist on 3 columns.

You insist on holes at 2 and 3.

That is sufficient to force

line at 1   hole at 2 hole at 3
line at 4   line at 5  line at 6
line at 7

and the rest is immaterial; there is nothing to else to show, so Stata is done.

Nick [Cox]

On Mon, Feb 4, 2013 at 5:12 PM, Nick Winter <njgwinter@gmail.com> wrote:
> By default, Stata counts the positions from left to right, top to bottom
> (like reading in English).  So position two, in a three-column array, is the
> top-middle, position three is the top-right.  Then the markers fill in from
> there.
>
> the -colfirst- option tells state to count down then across, so you could
> use
>
>  ... legend( hole(4 6 7) cols(3) colfirst)
>
> Note that this reordered the series.
>
> - Nick
>
>
> On 2/4/2013 11:18 AM, Tomas Lind wrote:
>>
>> Yeas, it works!
>>
>> How can I understand the logic behind hole(2 3)?
>> To me it looks like there is a hole in position 2 and 3 on row 1
>> and the same in row 3?
>>
>> /Tomas
>>
>>
>>
>> -----owner-statalist@hsphsun2.harvard.edu skrev: -----
>> Till: statalist@hsphsun2.harvard.edu
>> Från: Nick Winter
>> Sänt av: owner-statalist@hsphsun2.harvard.edu
>> Datum: 2013-02-04 17:09
>> Ärende: Re: st: Legend with rows and columns in a line graph
>>
>> This does it for me:
>>
>>    ... , legend(cols(3) hole(2 3))
>>
>> - Nick Winter
>>
>>
>> On 2/4/2013 10:12 AM, Tomas Lind wrote:
>>>
>>> Hi all,
>>>
>>> Legend in a twoway line graph
>>>
>>> I´m making a line graph with 5 lines (5 variables).
>>> I would like the legend to show the items with 3 rows
>>> and 3 columns, see illustration below.
>>> I´m trying desperately with -" " and holes(2) etcetera
>>> but I can´t make it.
>>>
>>> Does anyone know anything about this?
>>>
>>> The --- is my illustration for the lines that Stata produces
>>>
>>>
>>> --- Mean A
>>> --- Mean B   --- B CI lower  --- B CI upper
>>> --- Mean C
>>>
>>>
>>> I´m running Stata SE 11.1 on Windows
>>>
>>>
>>>
>>> /Tomas
>>>
>>> Tomas Lind
>>> Stockholm Sweden
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index