Consider the following:
library(ggplot2)
df = data.frame(x = rep(0,9), y = rep(0,9), alp = c(1:8/20,1))
ggplot(df) +
geom_point(aes(x, y, alpha=alp), size = 20, col = 'red') +
theme_minimal() + facet_wrap(~ alp) + guides(alpha = F)
As you can see there are feint outlines. It makes overlaying many low-transparency points look a bit like frogspawn. Is this just a Mac thing? Any idea how to remove it?
The default point shape for ggplot2 is
pch = 19
. It's not one of those points where the colour of its border and its inside can be controlled separately; for instance, in the following,fill = 'black'
has no effect.Yet the point does have a boundary line. The line's width can be changed with
stroke
; as follows:Unfortunately, setting stroke to zero will not remove the boundary line; it seems there is a lower limit.
To remove the boundary line, use one of the shapes that has a border that can be manipulated; for instance,
shape = 21
. Set its "fill" to red and its "colour" to transparent.