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

There is an error in drawing graphics using the plot function of rstudio

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

Solution:
use the code first

par("mar")

Check the Mar parameter and you’ll probably get this result

[1] 5.1 4.1 4.1 2.1

Reset this parameter

par(mar=c(1,1,1,1))

Then the problem was solved

source

Read More: