Is there a way to plot both horizontal and vertical point ranges together on the same plot in ggplot. I understand that geom_pointrange(...) plots vertical point ranges, and that horizontal point ranges can be generated with coord_flip(...), but I'm interested in putting both together on the same plot.
set.seed(1)
df <- data.frame(x=sample(1:10,10),y=sample(1:10,10), x.range=1, y.range=2)
library(ggplot2)
ggplot(df) +
geom_pointrange(aes(x=x, y=y, ymin=y=y.range, ymax=y+y.range))
I'm looking for something like this:
ggplot(df) +
geom_pointrange(aes(x=x, y=y,
ymin=y-y.range, ymax=y+y.range,
xmin=x-x.range, xmax=x+x.range))
Which of course produces the same output as above because the xmin and xmax arguments are ignored. Evidently, there is (was) a function geom_hpointrange(...) in ggExtra, but this package has been pulled as far as I can tell.
