functionality missing from ggplot2?
bbolker opened this issue · 5 comments
as discussed here, there still seem to be a few pieces of ggstance
functionality that don't exist (yet?) in ggplot2
- vertical dodging (
position_dodgev
) - horizontal orientation of line segments in legends (
geom_pointrangeh
vs.geom_pointrange(xmin=..., xmax= ...)
Perhaps this is better for the ggplot2
issues list, but can you shed any light on whether (1) these are already implemented in some way in ggplot2
but I'm missing them or (2) there are plans to migrate this functionality to ggplot2
?
@thomasp85 Can you chime in here please?
these are just oversight - can you provide an example of using position_dodge that doesn't work as expected with flipped orientation?
OK,I was wrong about the first - position_dodge
does seem to work (although it would be good to have a documentation patch: "Dodging preserves the vertical position of an geom while adjusting the horizontal position" is now an incomplete description of what position_dodge
does ...)
However, the orientation of segments in the legends is still an issue (see also here and here)
thanks
library(ggplot2)
dd <- data.frame(x=1:4,y=rep(1:2,each=2),
xlo=(1:4)-0.5,
xhi=(1:4)+0.5,
f=factor(rep(letters[1:2],2))
)
ggplot(dd,aes(x,y,colour=f)) +
geom_pointrange(aes(xmin=xlo,xmax=xhi),
position=position_dodge(0.1))
library(ggstance)
ggplot(dd,aes(x,y,colour=f)) +
geom_pointrangeh(aes(xmin=xlo,xmax=xhi),
position=position_dodgev(0.1))
I don't know if you do or don't want "bumps" (if not, I apologize) but I've just encountered this issue again ... this could possibly be fixed/worked around by adding a new key_glyph
option ?
ggstance is no longer under development so this issue would belong in ggplot2. Unfortunately I can't transfer issues to another organisation. Could you reopen in tidyverse/ggplot2
please?