[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Wed, 8 Jun 2005 01:45:20 +0100 (BST) |

Nick Cox replied: > 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. Thanks for this. I followed this to the letter before calling the same -twoway line- command (see below), but I'm _still_ not achieving the result I want. I don't why. Following Scott Merryman's suggestion to: . twoway line beconch belabch beldmch quarter, xtitle("") /// ylabel(.1 "100" .075 "75" .05 "50" .025 "25" 0 "0" -.025 "-25" /// -.05 "-50" -.075 "-75" -.1 "100", angle(0)) xlabel(1 "Q1" /// 2 "Q2" 3 "Q3" 4 "Q4") clpattern(longdash dash) scheme(s1mono) produces exactly the graph I expect to see. I should also have mentioned that my scale runs from -100 through zero to +100 (sorry about that), but the same problem ensues anyway. If I run . mylabels -100(25)100, myscale(@/100) local(label100) -1 "-100" -.75 "-75" -.5 "-50" -.25 "-25" 0 "0" .25 "25" .5 "50" .75 "75" 1 "100" . myticks -100(25)100, myscale(@/100) local(tick100) -1 -.75 -.5 -.25 0 .25 .5 .75 1 and then . twoway line beconch belabch beldmch quarter, xtitle("") /// ylabel(`label100', angle(0)) xlabel(1 "Q1" 2 "Q2" 3 "Q3" 4 "Q4") /// scheme(s1mono) ymtic(`ticks100') I get a heavily squashed graph where all three trendlines deviate no more than +/-10 percentage points around zero, whereas I should be seeing all sorts of sexy stuff going on all over the graph. I'll take the liberty of e-mailing the graphs privately to Nick, as it's not possible to demonstrate here the visual difference between the graph I should be getting (the 'right' graph) and the one I'm getting instead using -mylabels- (the 'wrong' graph). In the meantime, I shall be trying out the other suggestion, out of courtesy to Nick Winter. Thanks once again. 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/

**References**:**RE: st: RE: Automatically changing -ylabel()- values using -graph-***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: Blundell and Bond (1998).** - Next by Date:
**RE: st: RE: Automatically changing -ylabel()- values using -graph-** - Previous by thread:
**RE: st: RE: Automatically changing -ylabel()- values using -graph-** - Next by thread:
**RE: st: RE: Automatically changing -ylabel()- values using -graph-** - Index(es):

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