Hi everyone,

I have the following call to the barplot() function which produces the
desired stacked bar chart. HOWEVER, barplot() chooses 4 different shades of
gray for the stacks. If I want to use the legend=NULL argument in
combination with a separate call to legend() to customize the legend, how
do I figure out exactly what shades of gray barplot() has choosen? Can
these color names be extracted from the barplot after saving it as an
object?

barplot(table(credit_rating_num,clu_),
 xlab="Cluster Label",
 ylab="Frequency",
 ylim=c(0,7000),
 legend=c("C2","C3","C4","C5"))

Thank you,

Dan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to