【发布时间】:2018-02-23 23:38:02
【问题描述】:
我有以下代码:
library(tidyverse)
data_frame(x = 1:5, x1=x+1, c = c('a','a','a','b','b')) %>%
ggplot() +
geom_curve(aes(x = x, xend= x1, y = 0, yend = 0), curvature = -1.3, alpha=.2) +
facet_wrap(~ c, ncol=1)
我尝试过这样做:
data_frame(x = 1:5, x1=x+1, c = c('a','a','a','b','b')) %>%
ggplot() +
geom_curve(aes(x = x, xend= x1, y = 0, yend = 0), curvature = -1.3, alpha=.2) +
facet_grid(c ~ .) +
ylim(0,.35) +
facet_wrap(~ c, ncol=1)
但它只是根据ylim 中的值重新调整拱门。如何防止这种行为?
【问题讨论】:
-
您的代码摘录不会产生第一个粘贴的图。你有
+ facet_wrap(~c, ncol=1)或其他东西吗?另外,您是否在顶部致电library(tidyverse)?明确将有助于回答者 -
@arvi1000 谢谢我修好了