I have a dataset with an x variable and two y1 and y2 variables (3 columns in total). I would like to plot y1 against x as a bar plot above the axis and y2 against the same x in the same plot underneath the x axis so that the two bar plots mirror each other.
Figure D below is an example of what I am trying to do.

Using
ggplotyou would go about it as follows:Set up the data. Nothing strange here, but clearly values below the axis will be negative.
Plot using
ggplotandgeom_bar. To preventgeom_barfrom summarising the data, specifystat="identity". Similarly, stacking needs to be disabled by specifyingposition="identity".