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/