R语言提取图片颜色
(2017-11-17 11:02:39)分类: R语言 |
https://github.com/woobe/rPlotter
装包:
## CRAN Packages
install.packages(c("ggplot2", "stringr", "reshape2", "dichromat"))
## EBImage
source("http://bioconductor.org/biocLite.R")
biocLite("EBImage")
## Packages on GitHub
library(devtools)
install_github("ramnathv/rblocks")
## And finally ...
install_github("woobe/rPlotter")
library(rPlotter)
## Using the R Logo
##提取颜色,括号内为图片地址。
pal_r <- extract_colours("http://developer.r-project.org/Logo/Rlogo-1.png")
par(mfrow = c(1,2))
pie(rep(1, 5), col = pal_r, main = "Palette based on R Logo")
hist(Nile, breaks = 5, col = pal_r, main = "Palette based on R Logo")
前一篇:R语言heatmap图