如何更改R barplot中的颜色条?

时间:2015-12-21 17:05:24

标签: r

我想改变只有固特异和酒吧的颜色。提前致谢 这是我用来获取图形的代码

library(readxl)
bist <- read_excel("A7.xlsx", sheet=1)
bistOrder <- bist[order(bist$SECTOR),]
bistRE <- bistOrder[c(293:295),]
bistREorder <- bistRE[order(as.numeric(bistRE$FA)),]
bistREorder$FA <- as.numeric(bistREorder$FA)
s <- strsplit(bistREorder$COMPANY, " ")
x1 = lapply(s, function(x) x[[1]])
RE <- bistREorder
rownames(RE) <- unlist(x1)
par(mai=c(1,2,1,1))
barplot(log(RE$FA), horiz=T, names.arg=rownames(RE), las=1, 
    main="Size Distribution in tyre products Sector",
    xlab="Log Fixed Assets")

The graph

0 个答案:

没有答案