gpt4 book ai didi

r - 更改R中箱线图中各个框的宽度

转载 作者:行者123 更新时间:2023-12-05 02:40:55 25 4
gpt4 key购买 nike

如何减小 Base R 中每个单独箱线图的宽度?

我不想更改箱线图的相对大小,据我所知,这可以通过width 参数来完成

(这与 this post 不同,后者询问有关删除空格的问题)

boxplot(mpg ~ cyl,
data=mtcars)

enter image description here

最佳答案

您可以使用 boxwex= 参数设置默认宽度。有关这些参数的更多信息实际上可以在绘制箱线图的 ?bxp 帮助页面中找到。在 ?boxplot 帮助页面中描述 ... 参数时提到了这一点。

boxplot(mpg ~ cyl, data=mtcars, boxwex=.2)

narrow box plots

关于r - 更改R中箱线图中各个框的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68383405/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com