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

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


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   st: Automatically changing -ylabel()- values using -graph-
Date   Sun, 5 Jun 2005 11:46:32 +0100 (BST)

Stata 8.2, Windows 2000

After carefully checking -whelp axis_label_options-, as well the relevant
pages in Mitchell (2004), I find that I'm unable to automatically change
the values in the y-axis of any graph I generate by a pre-specified
factor. I looked at the various possibilities of the -ylabel()- option
very closely.

An example: I can happily fire up this command

. graph twoway tsline beconch belabch, xsize(9) ysize(6) clpattern(dash)
  xlabel(5(10)125) ylabel(, angle(0)) scheme(s1mono)

without any problems. However, the above pair of variables had to be
normalized to take values between 0-1 only for other purposes. I want the
graph re-expressed in its original 0-100 values. I know I could easily
-generate- new variables that range from 0-100, but I'm surprised that
there does not seem to be an option within -graph- that would allow one to
do this

. graph twoway tsline beconch belabch, xsize(9) ysize(6) clpattern(dash)
  xlabel(5(10)125) ylabel(factor(100), angle(0)) scheme(s1mono)

automatically, without the need to create new variables first. Am I being
picky here, do I have a point or (even better) can this indeed be done
already? Any thoughts or hints are welcome: ta.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

References:

Mitchell MN (2004) A VISUAL GUIDE TO STATA GRAPHICS, College Station, TX:
Stata Press.

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