boxplotCharacter {MorphoTools2} | R Documentation |
Box Plots
Description
These functions produce a box-and-whisker plot(s) of the given morphological character(s).
Usage
boxplotCharacter(object, character, outliers = TRUE, lowerWhisker = 0.05,
upperWhisker = 0.95, col = "white", border = "black", main = character,
cex.main = 1.5, xlab = NULL, ylab = NULL, frame = TRUE, pch = 8,
horizontal = FALSE, varwidth = FALSE, ...)
boxplotAll(object, folderName = "boxplots", outliers = TRUE, lowerWhisker = 0.05,
upperWhisker = 0.95, col = "white", border = "black", main = character,
cex.main = 1.5, xlab = NULL, ylab = NULL, frame = TRUE, pch = 8,
horizontal = FALSE, varwidth = FALSE, width = 480, height = 480, units = "px", ...)
Arguments
object |
an object of class |
character |
a morphological character used to plot boxplot. |
folderName |
folder to save produced boxplots. |
outliers |
logical, if |
lowerWhisker |
percentile to which the lower whisker is extended. |
upperWhisker |
percentile to which the upper whisker is extended. |
col |
background colour for the boxes. |
border |
colour of outliers and the lines. |
frame |
logical, if |
main |
main title for the plot. |
cex.main |
magnification to be used for the main title. |
pch |
plotting symbol of the outliers. |
xlab , ylab |
title of the respective axes. |
horizontal |
logical, indicating if the boxplot should be horizontal. |
varwidth |
logical, if |
width |
the width of the figure. |
height |
the height of the figure. |
units |
the units in which |
... |
Details
These functions modify the classical boxplot
function to allow whiskers to be extended to the desired percentiles. By default, the whiskers are extended to the 5th and 95th percentiles, because of the trimmed range (without the most extreme 10% of values) use to be used in taxa descriptions, determination keys, etc. Box defines 25th and 75th percentiles, bold horizontal line shows median (50th percentile). Missing values are ignored.
The boxplotAll
function produces boxplots for each morphological character and saves them to a folder defined by the folderName
argument. If it does not exist, a new folder is created.
Value
None. Used for its side effect of producing a plot(s).
Examples
data(centaurea)
boxplotCharacter(centaurea, character = "ST", col = "orange", border = "red")
boxplotCharacter(centaurea, character = "ST", outliers = FALSE,
lowerWhisker = 0.1, upperWhisker = 0.9)
boxplotCharacter(centaurea, "ST", varwidth = TRUE, notch = TRUE,
boxwex = 0.4, staplewex = 1.3, horizontal = TRUE)
boxplotCharacter(centaurea, "ST", boxlty = 1, medlwd = 5,
whisklty = 2, whiskcol = "red", staplecol = "red",
outcol = "grey30", pch = "-")
## Not run: boxplotAll(centaurea, folderName = "../boxplots")