I have this plot I'm trying to make. I want to make variable a and b non filled and values c and d filled as geom_col. However, there are times a is greater than b and times b is greater than a and I want both the values to show in the plot. Currently a is masking b if if a is higher.
plot <- ggplot(melt_train2, aes(x=f,label=f)) + big_theme + theme2 + theme3
plot + labs(y="abc") +
geom_col(position = "identity",aes(x=d,y=v,width=0.5,
fill=forcats::fct_relevel(variable, c("a", "b","c", "d")),
color=forcats::fct_relevel(variable, c("a", "b","c", "d"))))+
scale_alpha(c(0,0,1,1),labels=c("a","b","c","d")) +
scale_fill_manual(values=c("#000000","#000000","#CD572E","#275636")
,labels=c("a","b","c","d")) +
scale_color_manual(values=c("#EE82EE","#4782A6","#CD572E","#275636")
,labels=c("a","b","c","d")) + labs(y="abc") +
facet_grid(.~grp2,space="free_x", scales="free_x",
switch="x",shrink=FALSE) +
geom_hline(yintercept=1,color="white",size=2)+
theme(strip.text=element_text(size=18,hjust = 0.5),strip.placement = "outside",
strip.background = element_rect( colour="white"),
panel.spacing=unit(0,"cm")) + coord_cartesian(ylim=c(minval,maxval))
+scale_y_continuous(breaks=seq(minval,maxval,(maxval-minval)/5))