I have some data which look like this:
value direction
2.2 UP
2.3 DOWN
2.4 UP
2.4 DOWN
2.5 DOWN
2.5 UP
2.5 DOWN
2.5 UP
2.6 DOWN
... etc.
I'm using ggplot2 in R and looking to make a back-to-back histogram. I can make both separately using + scale_y_reverse()
.... But it is not what I need.
I need to make a back-to-back graph so that all the "DOWN" values are on the negative y axis and UP values on the positive y axis. The x axis is the "value" column and y axis is a count of the number of UP or DOWN in that range.
Can anyone help with this? So that DOWN values are counted in negative direction..
Any help is appreciated. Thanks.