Showing posts with label bean plot. Show all posts
Showing posts with label bean plot. Show all posts

Tuesday, April 9, 2013

RG#48: beanplot


# data 
set.seed(1234)
 bimodal <- c(rnorm(250, -2, 0.6), rnorm(250, 2, 0.6))
uniform <- runif(500, -4, 4)
 normal <- rnorm(500, 0, 1.5)
 ylim <- c(-7, 7)



# plot 
 library("beanplot")
beanplot(bimodal, uniform, normal, ylim = ylim, main = "beanplot",col = c("cyan3", "purple", "purple"), border = "cyan3")
 # col - these colors stand for the area of the beans (without the border, use border for that color), the lines # inside the bean, the lines outside the bean, and the average line per bean



nn