I'd like to center the location of geom_step()
over the value of x instead of starting at that location
as described here: https://github.com/tidyverse/ggplot2/issues/3348.
My understanding is that the option "mid"
for the direction
parameter has been added in https://github.com/tidyverse/ggplot2/pull/3435, but it seems it is not available in the public version of R.
In fact, I get the following error when trying to use it:
# Error in match.arg(direction, c("hv", "vh")) :
# 'arg' should be one of “hv”, “vh”
Why is the feature not available? What could I do alternatively?
I've considered using position_nudge
as described here: How to center line in ggplot2::geom_step() similar to highcharter, but my elements are not at the same distance so this wouldn't work.
Thanks a lot!