Statalist


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: Need to Title a Second Y-Axis...
Date   Wed, 10 Jun 2009 16:30:36 +0200

<> 

Maarten and Robert do have a case. I cannot make the title appear on a -by- graph, either, even with the help of the dialog box.

*************
sysuse uslifeexp, clear

gen byte dummy=_n>`=_N/2'

twoway (line le_male year)/* 
 */  (line le_female year, yaxis(2)), /* 
 */ ytitle(Left Side) ytitle(Right Side, axis(2))/* 
 */  by(dummy)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Maarten buis
Gesendet: Mittwoch, 10. Juni 2009 16:11
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: Need to Title a Second Y-Axis...


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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index