Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Automatically changing -ylabel()- values using -graph-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Automatically changing -ylabel()- values using -graph-
Date   Tue, 7 Jun 2005 11:22:29 +0100

This was sent 1 minute before a 9 am meeting. 

One detail is not right. Stata is not 
ignoring your rules: it is taking them literally. 
The Third Law of Stata applies: your punishment 
is that you got what you asked for. 

The diagnosis about the call being the wrong 
round is still the same. 

Nick 
[email protected] 

Nick Cox
 
> Your call is the wrong way round. You want (e.g.) 
> the text "25" at 0.25. Stata's ignoring your label
> rules as irrelevant to the data you have. Start with 
> 
> mylabels 0(25)100, myscale(@/100) local(label100)
> 
> Think "my graph labels that I want are 0(25)100, but 
> my data scale is that of the labels divided by 100". 
> 
> I invented this beast, but I make the same mistake
> too some fraction of the time. 
> 
> Nick 
> [email protected] 
> 
> Clive Nicholas
>  
> > Nick Winter will forgive me if I don't report back on his 
> > solution just
> > yet, for I'm having problems implementing Nick Cox's 
> > -mylabels- solution.
> > 
> > . mylabels 0(.25)1, myscale(100 * @) local(label100)
> > 0 "0" 25 ".25" 50 ".5" 75 ".75" 100 "1"
> > 
> > . myticks 0(.25)1, myscale(100 * @) local(ticks100)
> > 0 25 50 75 100
> > 
> > . twoway line beconch belabch beldmch quarter, xtitle("") ylabel
> >   (`label100', angle(0)) xlabel(1 "Q1" 2 "Q2" 3 "Q3" 4 "Q4") 
> > scheme(s1mono)
> >   ymtic(`ticks100')
> > 
> > The -be*- variables are normalized (0-1) continuous 
> > variables; -quarter-
> > does what it says on the tin. I'm not allowed to show you the 
> > resulting
> > graph, but I can tell you that:
> > 
> > (1) I get a single flatline along the bottom of the graph 
> > when I should be
> >     seeing large zig-zag patterns; and
> > 
> > (2) the labels don't display in any case: I still get (0 
> .25 .5 .75 1)
> >     instead of (0 25 50 75 100).
> > 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index