Statalist


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

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


From   "Ploutz-Snyder, Robert (JSC-SK)[USRA]" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Need to Title a Second Y-Axis...
Date   Wed, 10 Jun 2009 09:39:18 -0500

Ok.. so I'm not going crazy then.
I did discover that if you go into the chart editor tool, double click on the right axis, then click the "Title" button, then select the "Advanced" Tab and UNCHECK the box for "hide text box," the title from my code magically appears.

So if someone can figure out how to turn off the default function of  hiding the text box on the second Y-axis title, that should do it??

Thanks for solidifying my sanity on this one! 
Rob

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Wednesday, June 10, 2009 9:31 AM
To: [email protected]
Subject: AW: st: Need to Title a Second Y-Axis...


<> 

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: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Mittwoch, 10. Juni 2009 16:11
An: [email protected]
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/

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