ccr.multDensPlot | R Documentation |
This functions plots multiple distribution densities with solid colors for the curves and shaded colors for underlying areas.
ccr.multDensPlot(TOPLOT, COLS,
XLIMS, TITLE, LEGentries, XLAB)
TOPLOT |
A list of density object computed using the |
COLS |
A vector of colors of the same length of |
XLIMS |
A vector of two numerical values optionally specifying x-axis limits (NULL by default). |
TITLE |
A string containing the plot title. |
LEGentries |
A vector of strings (one per each density in |
XLAB |
A string containing the x-axis label. |
Francesco Iorio (francesco.iorio@fht.org)
## generating random data
x <- rnorm(1000, 0, 0.5)
y <- rnorm(1000, 2, 0.4)
z <- rnorm(1000, -1, 1.5)
## assembling kernel estimated distributions into a list
ToPlot<-list(x=density(x),y=density(y),z=density(z))
## density visualisation
ccr.multDensPlot(ToPlot,COLS = c('red','blue','gray'),
TITLE = 'example',LEGentries = c('x','y','z'),
XLIMS = c(-5,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.