Avoid clipping of points along axis in ggplot
With the release of ggplot2 version 3.0.0, you can simply use coord_cartesian(clip = 'off')
.
library(ggplot2)qplot(x = 1:10, y = 1:10, size=I(10)) + scale_y_continuous(expand=c(0,0)) + coord_cartesian(clip = 'off') + labs(title = "coord_cartesian(clip = 'off')")
If you're using one of the less commonly-used coord_*
systems or functions (e.g. coord_polar
or coord_flip
), then you can use the clip = 'off'
argument there, too.
my_plot + coord_flip(clip = 'off')