开发者

How to use plot.window? (in R)

When I run the following code:

xlim <- c(-30,30)
ylim <- c(-5,5)
plot.window(xlim , ylim )
plot.new()
points(1,1)
points(0,0)
开发者_运维知识库

For some reason, all I'm getting is a graphic window where it seems that the xlim/ylim are c(0,1).

Did I miss something about how to use the plot.window ?

Thanks.


You want to do plot.window() and plot.new() in the opposite order:

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

Currently, the new() is overriding the settings passed in window()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜