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

From |
Steven Samuels <sjhsamuels@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: number format in graph labels |

Date |
Wed, 13 Aug 2008 12:05:33 -0400 |

You can create a new label for the values you want to show on the graph

/**********************************************************************/

sysuse auto,clear

label define gwt000 0 "0" 1000 "1" 2000 "2" 3000 "3" 4000 "4" 5000 "5" ///

6000 "6" 7000 "7" 8000 "8" 9000 "9" 10000 "10"

label values weight gwt000

twoway scatter weight trunk, ylabel(0 1000 2000 3000 4000 5000, valuelabel) ytitle("Weight (1,000's of Pounds)")

/**********************************************************************/

help -label- will show you how to save such temporary labels for further use. Note that you can make the label go as high as you like, but use only a subset of values in the -ylabel- option.

-Steve

On Aug 13, 2008, at 11:29 AM, Maarten buis wrote:

--- Gisella Young <gisellayoung@yahoo.com> wrote:This is exactly what I would do. If you think carefully about it, anIt occurs to me that a (hopefully) simpler way might just be to title the y-axis "Whatever (thousands)" or "Whatever ('000)" and then have the labels all divided by a thousand, so what would have been 1000000 would just be 1000, in which case the absence of spaces doesn't really matter as the smaller number of 0's is easy to see. However I'm not sure if there is an easy way of doing this (in my pre-Stata life I made a lot of graphs in Excel and there is an option to tick to show the graph scale in 100's, 1000's, etc). I don't want to actually divide my y variable by 1000 as i still want the original variable to be used in plotting the chart, but just want to show the variable graphically in '000's - is there a way to do this in Stata?

option that removes three zeros from the y-axis labels does exactly the

same thing as dividing your y by 1000 and use that variable for the

plot.

-- Maarten

-----------------------------------------

Maarten L. Buis

Department of Social Research Methodology

Vrije Universiteit Amsterdam

Boelelaan 1081

1081 HV Amsterdam

The Netherlands

visiting address:

Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/

-----------------------------------------

Send instant messages to your online friends http:// uk.messenger.yahoo.com

*

* For searches and help try:

* http://www.stata.com/help.cgi?search

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: number format in graph labels***From:*Steven Samuels <sjhsamuels@earthlink.net>

**RE: st: number format in graph labels***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**References**:**RE: st: number format in graph labels***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**RE: st: Interpreting Poisson regression results with squared term** - Next by Date:
**RE: st: regression with heavily skewed dependant data (was "tobit?")** - Previous by thread:
**RE: st: number format in graph labels** - Next by thread:
**RE: st: number format in graph labels** - Index(es):

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