x**g 发帖数: 807 | 1 在R中,需要两个图overlap, 有什么命令可以让第一个图先hold, 然后把图二叠加上
去?
多谢了! | g*****d 发帖数: 526 | 2 lines
points。
挺长时间不用R了,记不太清了。你试试。 | X*********e 发帖数: 253 | 3 firts use plot
second use secdonatry functions such as line, points etc which will not
generate a new plot
【在 x**g 的大作中提到】 : 在R中,需要两个图overlap, 有什么命令可以让第一个图先hold, 然后把图二叠加上 : 去? : 多谢了!
| x**g 发帖数: 807 | 4 我的图里有4条不重叠的曲线,还有阴影, 所以才需要叠加的。
【在 x**g 的大作中提到】 : 在R中,需要两个图overlap, 有什么命令可以让第一个图先hold, 然后把图二叠加上 : 去? : 多谢了!
| t*****9 发帖数: 19 | 5 Hi,for example, use this:
x = seq(-pi,pi,.001);
plot(x,sin(x),xlim=c(-pi,pi));
par(new=T)
plot(y,cos(y),xlim=c(-pi,pi));
par(new=T)
plot(....)
will overlap, be careful of the x=axis, can use xaxis = F in plot argument,
etc.
Hope this will help. | x**g 发帖数: 807 | 6 这个好,太谢谢了!
,
【在 t*****9 的大作中提到】 : Hi,for example, use this: : x = seq(-pi,pi,.001); : plot(x,sin(x),xlim=c(-pi,pi)); : par(new=T) : plot(y,cos(y),xlim=c(-pi,pi)); : par(new=T) : plot(....) : will overlap, be careful of the x=axis, can use xaxis = F in plot argument, : etc. : Hope this will help.
| x**g 发帖数: 807 | 7 这个好,太谢谢了!
,
【在 t*****9 的大作中提到】 : Hi,for example, use this: : x = seq(-pi,pi,.001); : plot(x,sin(x),xlim=c(-pi,pi)); : par(new=T) : plot(y,cos(y),xlim=c(-pi,pi)); : par(new=T) : plot(....) : will overlap, be careful of the x=axis, can use xaxis = F in plot argument, : etc. : Hope this will help.
| r********e 发帖数: 100 | 8 sometimes, "add = T" option may present in the plot command for the overlay. |
|