如何为ggplot2
中的构面定义x轴比例。例如,要为vs
1和vs
0定义xscale。我已经使用scales = "free_x"
来使x标度自由,但是如何定义范围?
df <- mtcars
ggplot(df, aes(y = disp, x = hp)) + geom_jitter() +
facet_wrap( .~ vs, scales = "free_x" )+
#geom_blank(data=dummy2)+
theme_classic() +
theme(panel.spacing.x=unit(0, "lines"),panel.spacing.y=unit(0, "lines"),
strip.text.x = element_blank())