I am trying to make this graph in R:
However, I am not sure how to make the heights of each rectangle reset when their is no overlap.
The data frame that I am using is as follows:
data = data.frame("x"=c(1,1,1,5,5,7,7,10),
And a simplified version of the code is below:
However, this is not quite right...
Any help would be appreciated!