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   Wed, 8 Jun 2005 13:10:19 +0100

This looks like the same factor of 10 issue 
as before. Nick Winter's program has 
a factor default of 100, whereas your other 
graph is based on a factor of 1000, as said. 
So what you are asking of it is exactly 
equivalent to what you are asking of my code, 
and both differ from what you are asking 
using the code provided by Scott. 

Hence different requests produce different graphs. 

You're keeping a hold on your data. I surmise
however that although in principle your variables, 
mapped to percents, could range from -100 to 100, in 
practice the range is much smaller than that. 

As we can't use your data, any further discussion
would be more efficiently done by reproducing 
results with one of Stata's own datasets. 

Nick 
[email protected] 

Clive Nicholas
 
> Stata 8.2, Windows 2000
> 
> Nick Winter kindly provided this as a solution to my graph problem:
> 
> > program faclbl, rclass
> >          syntax anything(name=numlist id="Label List") , ///
> >                  [ Factor(int 100) local(string) ]
> >
> >          numlist "`numlist'"
> >          foreach v in `r(numlist)' {
> >                  local newlbl `"`newlbl' `v' "`=`v'*`factor''""'
> >          }
> >
> >          return local label `newlbl'
> >          if "`local'"!="" c_local `local' `newlbl'
> > end
> >
> >
> > Then you could type
> >
> >   . faclbl -6[2]6 , local(xlab)
> >
> >   . graph twoway scatter .... , xlabel(`xlab') ...
> 
> Having run this, I've discovered that I get exactly the same 
> 'wrong' graph
> as I got after using Nick Cox's -mylabels- option. I think I've worked
> what the problem is here, and anybody can correct me if they think I'm
> wrong. It would appear to be that although the labels display as they
> should, the line trends in the graph aren't changing with 
> them: ergo, a
> squashed graph. I'll send the attachments to both Nicks and 
> see what they
> say.
> 

*
*   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