[R] histogram-like plot - multiple bars side by side

Jörg Groß joerg at licht-malerei.de
Mon Sep 29 22:05:31 CEST 2008


Hi,

I found this example for producing multiple histograms;

  require(plotrix)
  l <- list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3))
  multhist(l)


Now I want something like that, for creating multiple density  
distributions (in one plot).

But I have two variables for one density distribution and "multhist"  
only allows me to add one variable;
   x <- seq(from=0, to=14, by=1)
   y <- dbinom(x, 14, 0.7, log = FALSE)


Is there a way to make a histogram-like plot with multiple bars side  
by side (for different distributions) like in the example?



More information about the R-help mailing list