2011-03-21 30 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