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 on April 23, and its replacement, 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" <>
To   <>
Subject   st: RE: tsline: label right y-axis
Date   Tue, 7 Jun 2011 09:03:18 -0700 (PDT)


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 Radwin
Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

> -----Original Message-----
> From: [mailto:owner-
>] On Behalf Of Barbara Engels
> Sent: Tuesday, June 07, 2011 2:16 AM
> To:
> 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,
> 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index