an issue with `shape = "ellipse"`
Syutenjyo opened this issue · comments
Syutenjyo commented
when i draw an ellipse annotation in geom_magnify, it just worked wrong
ggplot(diamonds[diamonds$carat>1.2,], aes(carat, depth, color = cut)) +
geom_point() +
geom_magnify(from=c(1.8,63,2.2,67),to=c(3.6,48,6,58),shadow = T,shape = "ellipse") +
coord_cartesian(clip = "off") +
theme(legend.position = c(1.15,.75),plot.margin = margin(20,90,10,10))
the annotation still looks like a rectangle thogth circled in an ellipse ┗( T﹏T )┛
David Hugh-Jones commented
You need to use a device which supports masks, also R 4.2 or higher.
Syutenjyo commented
thanks, when i export as a pdf file, the ellipse annotation works.