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()
精彩评论