【问题标题】:Control aspect ratio of individual facets, facet_wrap控制各个方面的纵横比,facet_wrap
【发布时间】:2023-04-07 14:38:01
【问题描述】:

有没有办法控制 facet_wrap() 图中单个图的大小/纵横比?谢谢, -D

【问题讨论】:

  • 也许this 线程可能对您有用。并且一定要阅读gridExtra。简短的回答是,我怀疑你可以,但它会涉及一些黑客攻击和保留你喜欢的关于刻面的东西可能很难。

标签: r ggplot2


【解决方案1】:

scales = "free_x"scales = "free_y"scales = "free" '释放' x 轴、y 轴或两者scales 是否是一种简单的解决方案?

这里有一个来自facet_wrap documentation page的例子,

library(ggplot2)
p <- qplot(displ, hwy, data = mpg)
p + facet_wrap(~ cyl, scales = "free") 

【讨论】:

    猜你喜欢
    • 2015-02-17
    • 1970-01-01
    • 2016-10-13
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 2013-03-09
    • 1970-01-01
    • 2013-03-06
    相关资源
    最近更新 更多