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   "Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: RE: Automatically changing -ylabel()- values using -graph-
Date   Thu, 9 Jun 2005 07:55:47 +0100 (BST)

Stata 8.2, Windows 2000

Nick Cox replied:

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

With pleasure. See what you all make of this:

. use http://www.stata-press.com/data/r8/abdata.dta

. replace emp= emp/100
(1031 real changes made)

. replace wage= wage/100
(1031 real changes made)

. mylabels 0(25)100, myscale(@/100) local(label100)
0 "0" .25 "25" .5 "50" .75 "75" 1 "100"

. myticks 0(25)100, myscale(@/100) local(tick100)
0 .25 .5 .75 1

. twoway line emp wage year, xtitle("") ///
  ylabel(.1 "100" .75 "75" .5 "50" .25 "25" 0 "0", angle(0)) ///
  clpattern(dash) scheme(s1mono)

It produces a rather violent-looking graphic, as well as getting the
y-scale all mixed up (I'm not aware that anything needs to be -sort-ed).
Have fun.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: clive.nicholas@ncl.ac.uk
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index