Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: tsline: label right y-axis


From   "David Radwin" <dradwin@mprinc.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: tsline: label right y-axis
Date   Tue, 7 Jun 2011 09:03:18 -0700 (PDT)

Barbara,

You're welcome, and I did get the email. You can always check the archives
online to see if your email got through.

One trick is to superimpose a second invisible but otherwise identical
line on top of the first and then specify a second axis. In this example I
also set the legend to just show the first visible line.

. sysuse uslifeexp

. tsset year

. twoway (tsline le) (tsline le, yaxis(2) lcolor(none) legend(order(1)))

David
--
David Radwin
Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Barbara Engels
> Sent: Tuesday, June 07, 2011 2:16 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: tsline: label right y-axis
> 
> Dear Statalist,
> 
> I have a time series graphic and need to label the left and the right y-
> axis (same variable, same scale). The commands I used (rlabel,
r2label...)
> were mostly rejected as "not allowed" (Stata 10.1).
> 
> Thanks again for yesterday's advice considering the rotation of labels.
> David Radwin's answer worked perfectly and I somehow didn't receive the
> "thank you"-message I sent immediately afterwards.
> 
> Best,
> Barbara

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