[R] side by side plot of Histogram and densityplot

Jue.Wang2 at sanofi-aventis.com Jue.Wang2 at sanofi-aventis.com
Fri Oct 13 21:33:19 CEST 2006


Using "par" seems easily put a "hist" and a density side by side on the same output window.

I would like to use some features in "histogram" from Lattice, but how can I put

"histogram" and "densityplot" side by side on the same graph?

Thank you


par(mfrow=c(2,1))
hist(y)
plot(density(y))


Jue Wang, Biostatistician
Contracted Position for Preclinical & Research Biostatistics
PrO Unlimited
(908) 231-3022



More information about the R-help mailing list