[R] Multiple histograms in one chart

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun Mar 13 15:15:45 CET 2005


Werner Wernersen wrote:
> Hi!
> 
> I've searched quite a while and this is probably a
> very easy question: How do I 
> prevent a new hist() histogram from clearing the chart
> window before drawing?
> 
> I would like to have several histograms simply drawn
> on each other in one chart...

See either ?par
   par(new=TRUE)
or try argument add = TRUE in hist, depending on what you want to do 
exactly.

Uwe Ligges


> Thanks for your help!
>    Werner
> 
> In use: win2ksp4 & R 2.0.1
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list