I am currently trying to create a bar plot, in which some variables have 2 levels and some just one. As I am using dodged bars this results in the single level bars not being centered (see figure).
I would like the "single" bars (e.g. B4) to be placed on the center of the variable name (not below). This is the code I have created so far:
t <- ggplot(data=test, aes(x=reorder(name,-auc), y=auc, fill=sensor)) +
geom_bar(stat="identity", position = position_dodge(width=0.6,preserve, "single"),width = 0.5)
Thanks for your support.