[R] Secondary y-axis

M. Shiham Adam msadam at soest.hawaii.edu
Sat Jul 14 03:03:14 CEST 2001

Dear R Users,

I have been trying to add a  secondary y-axis to an existing plot. I thought
this could be a trivial matter and have checked the Manual and Mailing List
Archive to see If I can find a solution.

It appears the suggested method by Uwe Ligges (fot from the Archive) did not
work. I am getting an error message saying the  "Error in plot.new() : axis
style "d" unimplemented". Does any one has simple a fix to this problem.


> I want to combine two plots. On the one hand i've got a histogram and on
the other hand a line plot. The y axis of the plot are different and i want
both axis (one on the right side the >other on the left side) in the plot.
How can I do this in R ?

I would try something like:

hist(....., xlim=c(.....))
plot(....., xaxt="n", yaxt="n", xlim=c(.....))

Uwe Ligges

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list