| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Graphs by and different axis scales [Stata 9]
That solved the problem, thanks a lot.
Rafa
----- Original Message -----
From: "Scott Merryman" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 26, 2007 3:58 PM
Subject: Re: st: Graphs by and different axis scales [Stata 9]
There are several suboptions that can be used with by() (see -help by
option-)
I believe you want the -yrescale- option.
For example,
. sysuse auto
(1978 Automobile Data)
. replace mpg = mpg*1000 if fore == 1
mpg was int now long
(22 real changes made)
. scatter mpg price, by(fore, yrescale)
On 6/26/07, R.E. De Hoyos <[email protected]> wrote:
I am plotting a two-way graph of varX and varY by years (4 years):
. tw scatter varY varX, by(year)
Y varies so much across the 4 time periods that Stata assigns a very
large
range of variation to Y, say from -100 to +100 for all four years. For
any
given year, the variation in Y is much less than -100 to +100, so I would
like to have a year-specific axis range. An obvious way of doing this is
to
compute separate graphs for each year:
foreach y in 1 2 3 4 {
tw scatter varY varX if year==`y'
}
Nevertheless I would like to have the four graphs in a single object
(.eps).
Is there a way to do this?
Thanks,
Rafa
*
* 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/
*
* 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/