Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Need to Title a Second Y-Axis...


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Need to Title a Second Y-Axis...
Date   Wed, 10 Jun 2009 14:11:29 +0000 (GMT)

--- On Wed, 10/6/09, Ploutz-Snyder, Robert wrote:
> I'm unsuccessful at applying axis title to a SECOND Y-axis
> on a plot..  Here's what I'm trying:
> 
> twoway line y1  X,  sort by(group) ||line y2 X,
> xtitle("Time") ytitle("Predicted y1") yaxis(2)
> ytitle("Predicted y2",axis(2))  sort

--- On Wed, 10/6/09, Martin Weiss wrote:
> Does work, though...
> 
> *************
> sysuse uslifeexp, clear
> 
> twoway (line le_wmale year) /* 
> */ (line le_bmale year, yaxis(2)),/* 
> */  ytitle(Left Side)/* 
> */  ytitle(Right Side, axis(2))
> *************

The problem is the -by()- option:

*---------- begin example --------
sysuse auto, clear
twoway scatter price mpg || ///
       scatter turn mpg,    ///
       by(foreign) yaxis(2)  ///
       ytitle("turn", axis(2))
*---------- end example -----------

Don't see an immediate solution though 
(have to leave now for a seminar).

-- Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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