Maybe it is by design, to cut points neatly when clip = "on"
?
How can I prevent it?
library(ggplot2)
df <- data.frame(var = "", val = 0)
ggplot(df) +
geom_point(aes(val, var), color = "red", size = 10) +
scale_x_continuous(
expand = c(0, 0),
limits = c(0,1)
) +
coord_cartesian(clip = "off") +
theme_classic()
Created on 2021-04-29 by the reprex package (v2.0.0)
update
Jared's answer was very helpful to identify my thought problem. The different themes have different settings for panel.border
and axis.line
.
This still leaves the question - how to make the axis line draw below the data points?