Description Usage Arguments Value Examples
A function to create stacked density plot using ggplot
1 2 3 4 5 6 7 | stackedDenistyPlot(data, densityColNames, stackFactor, stackColor,
kernel = c("gaussian", "epanechnikov", "rectangular", "triangular",
"biweight", "cosine", "optcosine"), bw = "nrd0", adjust = 1,
reomoveOutliers = FALSE, stackRotation = 0, stackSeperation = "auto",
x_text_size = 2, strip_text_size = 7, legend_text_size = 0.5,
legendRow = 1, legend_title = "stackName", legend_title_size = 1,
legend_key_size = 0.2)
|
data |
Data frame containing columns for density calculation. |
densityColNames |
The column names of those passed to density calculation. |
stackFactor |
A factor to create the stacks, length equalt to number of rows in data. |
stackColor |
Default use rainbow colour palette, but can be specified manually. |
kernel |
kernel applied for density calculation, includes "gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine", "optcosine". |
bw |
The smoothing bandwidth to be used. The default, "nrd0", has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., "SJ" would rather fit. |
adjust |
The bandwidth used is actually adjust*bw. |
reomoveOutliers |
If coerce the outliers to 1.5*IQR level. |
stackRotation |
How many degrees to rotate the density stacks. |
stackSeperation |
Adjust the stack height intervels, use "auto" for automatic adjustment; or specify a value form 0 to 1 times the median height of to all density plots. |
x_text_size |
Adjust the text size on x ticks. |
strip_text_size |
Adjust the text size on strip. |
legend_text_size |
Adjust the text size on legend. |
legendRow |
The number of rows of the legend. |
legend_title |
The title of the legend. |
legend_title_size |
The size of the legend title. |
legend_key_size |
Adjust the size of the legend key. |
a ggplot object
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.