Dear R users

LetÂ’s assume I have the following batches of data

a <- rnorm(20,200,100)
b <- rnorm(20,250,100)
c <- rnorm(20,300,100)

# I plot them as violin plots
require(vioplot)
vioplot(a, b, c)

# I plot them as simple violin plots
require(UsingR)
simple.violinplot(a, b, c)

# I plot them as boxplots
boxplot(a, b, c)
# I know that for boxplots I can colour them by col=c("white", "blue", "red")
# but this does not work for the other plots :-(

The question is:
How can I give different colours to each violin plot?
How can I put labels to each violin/boxplot plot instead of the numbers that
appear underneath them?

Cheers,

Fer

______________________________________________
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