Try this:
twoway connect y1 x || connect y2 x, yaxis(2) ///
by(b,l1title(title y1 here) r1title(title y2 here))
Scott
----- Original Message -----
From: Edwin Leuven <[email protected]>
Date: Tuesday, April 19, 2005 5:48 am
Subject: st: title on second axis in twoway
> dear all,
>
> in the code below i try to put a title on the secondary axis, but
> it doesn't
> work. does anyone know what i am doing wrong?
>
> thanks, edwin
>
>
>
> clear
> set obs 20
> g b = _n>10
> bys b: g x = _n
> g y1 = uniform()
> g y2 = 10*uniform()
>
> twoway (con y1 x, yaxis(1)) (con y2 x, yaxis(2)), by(b) ///
> ytitle("title y1 here", axis(1)) ///
> ytitle("title y2 here", axis(2))
*
* 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/