[R] plot with 2 y axes
Ben Bolker
bolker at ufl.edu
Tue Apr 21 23:20:59 CEST 2009
Christophe Dutang1 wrote:
>
> I would like to know how to do a plot with 2 y axes in R. With google,
> I found this topic has been discussed twice in the past:
> - http://tolstoy.newcastle.edu.au/R/e2/help/06/11/6049.html
> - https://stat.ethz.ch/pipermail/r-help/2000-September/008182.html
> Those links provide quite a good solution, but I wonder if there
> exists an easier solution to plot two series that have units in R? or
> in a contributed packages?
>
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-base:2yaxes
refers you to twoord.plot in the plotrix package.
(This function is not terribly flexible -- e.g. if you want to plot
a histogram and a line plot with different units, you will have
to revert to doing it yourself with par(new=TRUE) ...)
--
View this message in context: http://www.nabble.com/plot-with-2-y-axes-tp23164180p23165209.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list