更新时间:2023-01-27 09:23:29
您需要在 hist
方法中添加 col
参数如下:
You need to add the col
arguments in the hist
method as follows:
t<- c(69,68,67,65,65,62,59,59,54)
hist(t, main="Distribution of Player Ratings",xlim = c(0,99),
breaks=c(seq(40,99,5)), col = c("blue", "red", "gray", "green"))
查看以上执行后得到的图像:
See the image I got after above execution:
现在,您可以根据自己的需要替换颜色值(名称或十六进制值,例如#FFFF00)要求。
Now you can replace the colour values(either name or hexadecimal values like "#FFFF00") as per your requirements.