My problem is, that i need to create bar charts without the bars overlapping each other. A small example of my data is:
`structure(list(Variable = c("VPD", "Rg", "rH", "v2", "Ta", "p",
"LWS", "rs", "cs"), day = c(NA, NA, NA, NA, 0.25, NA, NA, -0.2745,
0.265), `p-value...3` = c(0.01125, 0.01308, 0.1965, 0.6166, 0.0004262,
0.1596, 0.04293, 0.0002368, 0.000393), night = c(0.4824, NA,
-0.366, NA, 0.7316, NA, NA, 0.2352, -0.2415), `p-value...5` = c(8.46e-07,
0.4547, 0.0002104, 0.6055, 2.2e-16, 0.8818, 0.609, 0.01325, 0.0113
)), row.names = c(NA, -9L), class = c("tbl_df", "tbl", "data.frame"
))`
the Code i use for the plot is (dput):
ggplot(data=Mischbewuchs, aes(`Variable`))+
geom_bar(aes(y=`day`),stat = "identity", fill="Orange")+
geom_bar(aes(y=`night`),stat = "identity", fill="blue", width = 0.5, position = "dodge")+
labs(y= "Spearman rank correlation coefficient", title = "a)")+
geom_abline(intercept = 0, slope = 0, color="black")+
theme_bw()
You can see, that the part with position="dodge" does not work (Ta). Width=0,5 is for visibility only.