科学网

 找回密码
  注册

tag 标签: 散点上文字添加

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

ggplot2实现散点图上文字的添加
xbinbzy 2017-1-12 10:50
数据准备: 实现代码: library(ggplot2) png(./pcr.png) data=read.table(pcr.csv,header=T) p-ggplot(data,aes(x=pca1,y=pca2,group=group))+scale_shape_manual(values=c(0,1,2,3,4,5,6,7,8)) + geom_point(size=6,aes(colour=group))+geom_text(label=paste(data$date),colour=black,size=4) p+theme(axis.title.x=element_text(face=bold,family=Arial,size=20),axis.title.y=element_text(face=bold,family=Arial,size=20),axis.text.x=element_text(family=Microsoft YaHei, size=12), axis.text.y=element_text (family=Microsoft YaHei,size=12)) dev.off() 最终图表
个人分类: R语言画图|28841 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-18 21:28

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部