Error in plot.new()

2019-03-06 07:53发布

问题:

I'm using R Studio when doing some GIS plots. Unfortunately I keep getting this same error but only on certain maps.

Error in plot.new() : figure margins too large

I know its an issue with the plotting window size but I'm wondering if there is a way to edit the default settings without having to manually change the window size every time?

回答1:

You can alter R to plot to a different device, which can let you pop out the plot in a separate window.

A Windows solution:

plot_data <- sample(1:100,100)
windows(width=500,height=500)
plot(plot_data,type="o")

See also this answer.