缩放轴并将两个图形合并为一个

时间:2020-01-23 09:07:22

标签: r ggplot2 merge

我尝试将深度轴放置在刻度上,但是经过多次尝试后,我无法这样做。

enter image description here

以下是允许我生成图形的代码:

MOZ_Echt <- subset_samples(MOZ, corebis == "CSF_04" | corebis == "MTB_03" | corebis == "MTB_05" | corebis == "CSF_19")

plot_bar(MOZ_Echt,fill="Domain",x="depth")+xlab("Depth (cm)")+scale_y_continuous(labels = scales::percent)+ facet_wrap(~corebis, scales = "free_x", ncol=2) + geom_bar(stat="identity", position="stack") + coord_flip() + scale_x_discrete(limits=c("878", "818", "718", "696", "646", "618", "596", "518", "418", "396", "346", "318", "296", "246", "218", "196", "131", "118", "18","13.5","8.5","5","3","1.5","0.5"))

此外,如果可能的话,我还要将MTBO05和CSF19的MTBO3和CSF04放在同一张图中。

你能帮我吗?

谢谢

0 个答案:

没有答案