I have a data set as below
data=data.frame(Country=c("China","United States",
"United Kingdom",
"Brazil",
"Indonesia",
"Germany"),
percent=c(85,15,25,55,75,90))
and code for the same is
names = data$Country
barplot(data$percent,main="data1", horiz=TRUE,names.arg=names,
col="red")
I would like to add a grey color to the bar plot after the given values is plotted.
Say for example for Country China once the bar graph is plotted for 85 the remaining 15 should be plotted in Grey color. Similary for United states once bar chart is plotted for value 15 in column percent the remaining 85 should be grey color.
Any help on this is very helpfull. Thanks