R


常用几何对象 (geom_point(), geom_line(), geom_bar(),...


文档摘要

常用几何对象 (geompoint(), geomline(), geombar(), geomhistogram(), geomboxplot()) R library(ggplot2) 创建一个简单的数据框 df <- data.frame( x = 1:10, y = rnorm(10) ) 使用geompoint()创建散点图 ggplot(df, aes(x = x, y = y)) + geompoint() R 调整点的大小、颜色和形状 ggplot(df, aes(x = x, y = y)) + geompoint(size = 3, color = "red", shape = 17) # shape 17是三角形 添加透明度 ggplot(df, aes(x = x,


发布者: 作者: 转发
评论区 (0)
U