ggplot无法绘制最小的点

6

当使用scale_size_area绘制点时,当数据跨越多个数量级时,最小的点会被省略。可能是由于舍入至零的某个地方引起的错误?

require(ggplot2)
d = data.frame(x=1:4, y=rep(1,4), v=10^(1:4))

ggplot(d, aes(x, y, size=v)) + geom_point() +
  geom_text(aes(label = v), size=2, col='red') +
  scale_size_area(max_size = 50) +
  theme(legend.position = "none")

enter image description here


如果你将 max_size 增加到例如 500,你会发现这个点已经消失了。 - geotheory
1个回答

0

我认为这可能与ggplot的waiver函数有关,由continuous_scalescale_size_area中调用。 - geotheory

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接