ggforce
ggforce copied to clipboard
facet_zoom() + coord_flip() highlights the wrong data
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()
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