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

Re: st: histogram x-axis


From   "LL Miller, Avon Longitudinal Study Parents and Children" <[email protected]>
To   [email protected]
Subject   Re: st: histogram x-axis
Date   Tue, 06 Dec 2005 13:20:43 +0000

Many thanks to both Nick Cox (message below) and Svend Juul for their prompt response. My variable was %8.0g. Changing it to %9.0g didn't make any difference but thanks for the suggestion Svend - it got me on the right path. I have used the suggestion by Nick with success.

--On 06 December 2005 12:23 +0000 n j cox <[email protected]> wrote:


I suspect that your xlabels are using whatever format has
been assigned to your variable, which will be shown by
a -describe-. Something like

hist f8dv440, frequency width(1) bfcolor(purple) blcolor(purple)
xla(, format(%2.0f))

should force the display of integers. This is documented
at the help for axis label options.

 >>> [email protected]

Good morning everyone,

I am using Stata 8 for Windows.

I have been trying to create a histogram using:

hist f8dv440, frequency width(1) bfcolor(purple) blcolor(purple)

which creates a lovely plot except for a strange interpretation of the
values on the x-axis. Rather than displaying the numbers 1 through 22
(the scale of my variable) it displays them as, for example,
5.00000000000000*e^0 so the x-axis is just a jumble of numbers.

There are lots of options for labelling the points themselves but I can't
find anything to change the display of the x-axis. There seem to be some
option for this if using -twoway- but not for an individual plot. The
variable itself is numeric with a width of three and no decimal places.

Any ideas how to change this?
*
*   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/


----------------------
LL Miller, Avon Longitudinal Study Parents and Children
[email protected]    0117 3311612
*
*   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