我想在R中叠加两个散点图,使得每组点具有其自己的(不同的)y轴(即,在图中的位置2和4),但是这些点看起来叠加在同一图上.
有可能这样做plot吗?
编辑显示问题的示例代码
# example code for SO question
y1 <- rnorm(10, 100, 20)
y2 <- rnorm(10, 1, 1)
x <- 1:10
# in this plot y2 is plotted on what is clearly an inappropriate scale
plot(y1 ~ x, ylim = c(-1, 150))
points(y2 ~ x, pch = 2)
Run Code Online (Sandbox Code Playgroud)