找回密码
 立即注册
查看: 5419|回复: 3

错误于plot.new() : figure margins too large

[复制链接]
发表于 2014-3-13 22:25:06 | 显示全部楼层 |阅读模式
想练习画一个图,以前也画过,但为何现在就出现了报错?(难道我以前的什么操作改变了环境?)求大神解惑
代码如下
x <- c(1:10)
y <- x
z <- 10/x
opar <- par(no.readonly=TRUE)
par(mar=c(5, 4, 4, 8) + 0.1)
plot(x, y, type="b",
     pch=21, col="red",
     yaxt="n", lty=3, ann=FALSE)


错误于plot.new() : figure margins too large

附上par()数据
par()
$xlog
[1] FALSE

$ylog
[1] FALSE

$adj
[1] 0.5

$ann
[1] TRUE

$ask
[1] FALSE

$bg
[1] "white"

$bty
[1] "o"

$cex
[1] 1

$cex.axis
[1] 1

$cex.lab
[1] 1

$cex.main
[1] 1.2

$cex.sub
[1] 1

$cin
[1] 0.2000000 0.2666667

$col
[1] "black"

$col.axis
[1] "black"

$col.lab
[1] "black"

$col.main
[1] "black"

$col.sub
[1] "black"

$cra
[1] 14.4 19.2

$crt
[1] 0

$csi
[1] 0.2666667

$cxy
[1]  0.03915597 -0.25052192

$din
[1] 8.361111 1.388889

$err
[1] 0

$family
[1] ""

$fg
[1] "black"

$fig
[1] 0 1 0 1

$fin
[1] 8.361111 1.388889

$font
[1] 1

$font.axis
[1] 1

$font.lab
[1] 2

$font.main
[1] 2

$font.sub
[1] 1

$lab
[1] 5 5 7

$las
[1] 0

$lend
[1] "round"

$lheight
[1] 1

$ljoin
[1] "round"

$lmitre
[1] 10

$lty
[1] "solid"

$lwd
[1] 1

$mai
[1] 1.360000 1.093333 1.093333 2.160000

$mar
[1] 5.1 4.1 4.1 8.1

$mex
[1] 1

$mfcol
[1] 1 1

$mfg
[1] 1 1 1 1

$mfrow
[1] 1 1

$mgp
[1] 3 1 0

$mkh
[1] 0.001

$new
[1] FALSE

$oma
[1] 0 0 0 0

$omd
[1] 0 1 0 1

$omi
[1] 0 0 0 0

$page
[1] TRUE

$pch
[1] 1

$pin
[1]  5.107778 -1.064444

$plt
[1] 0.1307641 0.7416611 0.9792000 0.2128000

$ps
[1] 16

$pty
[1] "m"

$smo
[1] 1

$srt
[1] 0

$tck
[1] NA

$tcl
[1] -0.5

$usr
[1] 0 1 0 1

$xaxp
[1] 0 1 5

$xaxs
[1] "r"

$xaxt
[1] "s"

$xpd
[1] FALSE

$yaxp
[1] 0 1 5

$yaxs
[1] "r"

$yaxt
[1] "s"

$ylbias
[1] 0.2


回复

使用道具 举报

 楼主| 发表于 2014-3-15 00:20:49 | 显示全部楼层
sorry,这个问题楼主解决了
回复

使用道具 举报

发表于 2014-5-12 22:50:24 | 显示全部楼层
请问,楼主是使用RStudio吗??我每次绘图在RStudio上运行总出现"Error in plot.new() : figure margins too large",但是在RGUI上运行却没有问题,是par()参数设置的问题??您可知如何解决??
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|R语言中文网

GMT+8, 2024-11-25 09:41 , Processed in 0.018778 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表