From the documentation of ggplot2::scale_size_area()
, I read that
scale_size_area()
ensures that a value of 0 is mapped to a size of 0.
However, in this simple example, I still see points where there zeros are. Is this a bug or am I interpreting this wrong?
library(ggplot2)
table(1:3, 1:3) |>
as.data.frame() |>
ggplot() +
aes(x=Var1, y=Var2, size=Freq) +
geom_point() +
scale_size_area()
Data
table(1:3, 1:3) |>
as.data.frame() |>
print()
Var1 Var2 Freq
1 1 1 1
2 2 1 0
3 3 1 0
4 1 2 0
5 2 2 1
6 3 2 0
7 1 3 0
8 2 3 0
9 3 3 1