R语言绘制散点图并着不同颜色4

set.seed(1234)
n=10000
c1=matrix(rnorm(n,mean=0,sd=.5),ncol=2)
c2=matrix(rnorm(n,mean=3,sd=2),ncol=2)
mydata=rbind(c1,c2)
mydata=as.data.frame(mydata)
names(mydata)=c("x","y")
with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "seashell"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "sienna"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "skyblue"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "slateblue"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "slategray"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "snow"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "springgreen"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "steelblue"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "tan"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "thistle"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "tomato"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "turquoise"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "violet"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "wheat"))

在这里插入图片描述
with(mydata,plot(x,y,pch=19,main=“Scatter Plot with 10000 Observations”,col = “whitesmoke”))
在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "yellow"))

在这里插入图片描述

with(mydata,plot(x,y,pch=19,main="Scatter Plot with 10000 Observations",col = "yellowgreen"))

在这里插入图片描述
参考文献:
https://bbs.huaweicloud.com/blogs/382975
百度搜索:
R语言基本绘图-plot参数:标题,坐标轴和颜色

R语言绘制散点图和折线

百度文库—颜色大全:含中英文对照及色值

开发环境:RStudio 微信截屏工具

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值