[R] two y-axis using ggplot

From: Thorsten Vogel <thorsten.vogel_at_staff.hu-berlin.de>
Date: Tue, 24 Jun 2008 10:32:12 +0200

Dear List Members

As a relatively new R user I am extremely glad for there being a nice tool such as ggplot for producing easily nice graphs in R. Now I want to produce graphs with two y-axis. I know that this has been asked a hundred times with respect to standard plots in R. (The answer, to my knowledge, has always been "No" or "No, see the help archive".) But: Is there a more straightforward way IN GGPLOT to draw several lines in one graphs using two different scales and displaying these two scales on the y-axis and the, say, z-axis? Seems to be an obvious extensions of typical plot commands but I can't find any suggestions how to do it.

Many thanks for any suggestions or hints.


Dr. Thorsten Vogel 
Institute for Economic Theory II
School of Business and Economics
Humboldt-Universitšt zu Berlin
Spandauer Str. 1
D-10178 Berlin
tel.: +49 (30) 2093 5667
fax: +49 (30) 2093 5696

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 24 Jun 2008 - 11:03:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 30 Jun 2008 - 17:31:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive