2011-03-21 31 views
1

当我运行下面的代码:如何使用plot.window? (以R)

xlim <- c(-30,30) 
ylim <- c(-5,5) 
plot.window(xlim , ylim) 
plot.new() 
points(1,1) 
points(0,0) 

出于某种原因,所有我得到的是一个图形窗口,似乎xlim/ylimc(0,1)

我有没有想过如何使用plot.window

谢谢。

回答

3

你想干什么plot.window()plot.new()以相反的顺序:

xlim <- c(-30,30) 
ylim <- c(-5,5) 
plot.new() 
plot.window(xlim , ylim) 
points(1,1) 
points(0,0) 

目前,new()被覆盖在window()

+0

我们去那里通过设置 - 谢谢。 – 2011-03-21 13:34:05