How to use plot.window? (in R)
10,765
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()
Author by
Tal Galili
Statistics, blogging, and the hope for a happy long life.
Updated on June 04, 2022Comments
-
Tal Galili almost 2 years
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
arec(0,1)
.Did I miss something about how to use the
plot.window
?Thanks.