plot.new() 中的错误:图边距太大,散点图 [英] Error in plot.new() : figure margins too large, Scatter plot

查看:32
本文介绍了plot.new() 中的错误:图边距太大,散点图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了不同的问题以寻求解决方案,并尝试了建议的方法,但我还没有找到使其工作的解决方案.

I've looked in different questions for a solution and I've tried what was suggested but I have not found a solution to make it work.

每次我想运行这段代码时,它总是说:

Everytime I want to run this code it always says:

plot.new() 错误:图边距太大

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

我不知道如何解决它.这是我的代码:

and I don't know how to fix it. Here is my code:

par(mfcol=c(5,3))
hist(RtBio, main="Histograma de Bio Pappel")
boxplot(RtBio, main="Diagrama de Caja de Bio Pappel")
stem(RtBio)
plot(RtBio, main="Gráfica de Dispersión")

hist(RtAlsea, main="Histograma de Alsea")
boxplot(Alsea, main="Diagrama de caja de Alsea")
stem(RtAlsea)
plot(RtTelev, main="Gráfica de distribución de Alsea")

hist(RtTelev, main="Histograma de Televisa")
boxplot(telev, main="Diagrama de Caja de Televisa")
stem(Telev)
plot(Telev, main="Gráfica de dispersión de Televisa")

hist(RtWalmex, main="Histograma de Walmex")
boxplot(RtWalmex, main="Diagrama de caja de Walmex")
stem(RtWalmex)
plot(RtWalmex, main="Gráfica de dispersión de Walmex")

hist(RtIca, main="Histograma de Ica")
boxplot(RtIca, main="Gráfica de caja de Ica")
stem(RtIca)
plot(RtIca, main="Gráfica de dispersión de Ica")

我能做什么?

推荐答案

每次创建绘图时都可能出现此错误 - Error in plot.new() : figure margins too large".为避免此类错误,您可以先检查 par("mar") 输出.你应该得到:

Every time you are creating plots you might get this error - "Error in plot.new() : figure margins too large". To avoid such errors you can first check par("mar") output. You should be getting:

[1] 5.1 4.1 4.1 2.1

要更改该写入:

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

这应该可以纠正错误.否则,您可以相应地更改值.

This should rectify the error. Or else you can change the values accordingly.

希望这对你有用.

这篇关于plot.new() 中的错误:图边距太大,散点图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆