如何使ggplot中的点看起来更大

时间:2017-08-14 21:30:40

标签: r ggplot2

ggplot(data_exp, aes(x = transaction, y = exp, size = count, colour = class, label = label)) +
geom_point(alpha = 0.5) + 
geom_text(colour = "black", vjust = 0, nudge_y = 0.5, size = 3, fontface = "bold")

我想让情节中的点看起来更大,我尝试使尺寸变为计数* 1000,但似乎没有任何改变。

plot

1 个答案:

答案 0 :(得分:0)

size

中使用geom_point审美

一个例子;

library(ggplot2)
data(mtcars)
# increase point size based on variable value
p <- ggplot(mtcars, aes(wt,mpg))
p + geom_point(aes(size=wt*100))

enter image description here