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: Labeling above the dot in -scatter-
From
Augusto Cadenas <[email protected]>
To
[email protected]
Subject
Re: st: RE: Labeling above the dot in -scatter-
Date
Tue, 31 Jul 2012 18:15:46 +0200
Indeed, thanks. In fact, if you add -mlabangle(vertical)- to the graph
command as follows:
scatter y x , ///
mlab(lab) mlabv(pos) msym(Oh) msize(huge) mlabangle(vertical) ///
|| scatter y x, mlab(pos) mlabpos(0) ///
msym(none) legend(off) ///
ysca(ra(.5 2.5)) xsca(ra(.5 6.5)) ///
ysca(off) xsca(off)
you see how much of a difference this makes. With vertical
orientation, "1" and "7" deliver qualitatively what "12" and "6"
deliver for text with horizontal orientation. "12" and "6" generate a
horrible mess with vertically oriented text.
Augusto
On Tue, Jul 31, 2012 at 5:14 PM, Nick Winter <[email protected]> wrote:
> This generates a graph that shows how the labels are arrayed for each clock
> position:
>
> clear
> set obs 12
> gen pos = _n
> gen y = 1 + (_n>6)
> gen x = mod(_n-1,6)+1
> gen label = "Label"
>
> scatter y x , ///
> mlab(lab) mlabv(pos) msym(Oh) msize(huge) ///
> || scatter y x, mlab(pos) mlabpos(0) ///
> msym(none) legend(off) ///
> ysca(ra(.5 2.5)) xsca(ra(.5 6.5)) ///
> ysca(off) xsca(off)
>
>
>
> Nick Winter
>
>
> On 7/31/2012 10:41 AM, Augusto Cadenas wrote:
>>>
>>> If I change -mlabposition(12)- to -mlabposition(1)- I think I get what
>>> you are describing. It looks like -mlabposition- uses the bottom of the
>>> words as the position reference rather than the middle of the words.
>>
>> Thanks, Lance, I think this is a good solution. Still, I don't
>> understand the logic behind where -mlabposition- places the string.
>> Does it look at the beginning, the middle, or the end of the string?
>> Why do -mlabposition(12)- and -mlabposition(1)- yield such different
>> results? I wonder.
>>
>> Best, Augusto
>>
>> On Tue, Jul 31, 2012 at 12:00 AM, Lance Erickson <[email protected]>
>> wrote:
>>>
>>> Augusto,
>>>
>>> If I change -mlabposition(12)- to -mlabposition(1)- I think I get what
>>> you are describing. It looks like -mlabposition- uses the bottom of the
>>> words as the position reference rather than the middle of the words.
>>>
>>> Best,
>>> Lance
>>
>> *
>>
>> * 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/
*
* 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/