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

用R画图的时候出了这错,之前用par()画都没出问题,提示的意思是我们画布的边缘太宽了,查了一下R官网给的:

help("par")

不断往下拉就能看到mar

mar
A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. The default is c(5, 4, 4, 2) + 0.1.

我运行试一下:

par("mar")

既然提示大了我们输入设置一下:

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

解决

猜你喜欢

转载自blog.csdn.net/zhou_438/article/details/84887350