ggforce icon indicating copy to clipboard operation
ggforce copied to clipboard

facet_zoom() + coord_flip() highlights the wrong data

Open eliocamp opened this issue 7 years ago • 1 comments

facet_zoom() shows the correct data, but the "shadow" that highlights the data in the original plot fails to flip.

library(ggplot2)
library(ggforce)

df <- data.frame(x = 1:100)
df$y <- df$x^2

ggplot(df, aes(x, y)) +
    geom_point() +
    facet_zoom(xy = x > 20 & x < 50) +
    coord_flip()

eliocamp avatar Jan 15 '18 20:01 eliocamp

This is unfortunately not possible to fix right now, as the coordinate system is not known at the time the indicators are drawn... I'll look into a possible future fix

thomasp85 avatar Feb 28 '19 15:02 thomasp85