[R] Two Y-axises and One X-axis
Timur Elzhov
Timur.Elzhov at jinr.ru
Sat Nov 8 17:32:23 CET 2003
On Fri, Nov 07, 2003 at 11:12:06AM -0600, umeno wrote:
> I would like to know if anyone knows how to draw a plot with two Y-axises and
> one X-axis? When you have two sets of y values that do not have the same
> scale, but correspond to the same x value, I would like to plot them on one
> graph.
x11()
plot(1:10)
op <- par(new = TRUE)
plot(101:110, axes = FALSE, xlab = "", ylab = "", ylim = c(90, 120))
axis(4)
par(op)
--
WBR,
Timur.
More information about the R-help
mailing list