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

st: RE: xscale range with negative upper bound


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: xscale range with negative upper bound
Date   Mon, 1 Nov 2004 15:04:15 -0000

A very clumsy work-around: 

Suppose your variables with negative values is -neg-. 

gen pos = -neg 
hist pos , xsc(reverse ra(10,60)) 
xla(10 "-10" 20 "-20" 30 "-30" 40 "-40" 50 "-50" 60 "-60")


Nick 
n.j.cox@durham.ac.uk 

maartenbuis
 
> The upper bound is ignored, when I make a histogram of a variable
> containing only negative values and I want to expand the x axis, but
> the upper bound is still negative. In the example below I expected
> the x-axis to run from -60 to -10, but it runs only from -60 to -30.
> What am I doing wrong here?
> 
> ***example***
> sysuse auto
> gen minturn = -turn
> hist minturn, xscale(range(-60 -10))
>   //x axis runs from -60 to -30 not -60 to -10
> 

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