本文介绍了R为xaxis标签腾出空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有以下方框图

如您所见,我的问题是标签超出了图形的边缘,因此不适合我的图形,我尝试使用 par 函数及其火星该属性显示了边距,但对我不起作用,我使用了par(par()$ mar + c(10,0,0,0))

as you can see my problem is that the lables are not fitting in my figure since they are exceeding the margins of the figure, I tried to use the par function and its mars attribute that shows the margins, but didn't work for me, I used par(par()$mar+c(10,0,0,0))

如果您对我的问题有任何想法,请告诉我

If you got any idea for my problem please let me know

推荐答案

您似乎没有将新创建的mar参数分配给mar参数

You don't appear to have assigned your newly created mar parameter to the mar parameter

比较

d <- data.frame(a=1:5,b=1:5)
boxplot(d)

# your call was
# par(par()$mar+c(10,0,0,0)) which doesn't specify which
# par is being set (and returns NULL, (A vague hint that it isn't working properly)
par(mar = par('mar') + c(10,0,0,0))
boxplot(d)

这篇关于R为xaxis标签腾出空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 19:40