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

st: RE: how to make the X axis increment by a certain value


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to make the X axis increment by a certain value
Date   Wed, 23 Nov 2005 16:14:20 -0000

foreach x in x1 x2 x3 x4 x5 { 
	su `x', meanonly 
	local xmin = floor(r(min)) 
	local xmax = ceil(r(max)) 
	scatter y `x', xla(`xmin'/`xmax') 
} 

Nick 
[email protected] 

Haidong Wang
 
> I know in Stata allows us to set the axis like xlabel(1(1)10), but if
> I am running a loop and the min and max of X axis vary from graph to
> graph, can I tell Stata to label X axis at every 1 value of X (or
> every 2) without specifying the min. and max. of X? I am sure there is
> a way to do it in Stata.

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