boxplot

boxplot(data, grp=[]; pos=nothing, kwargs...)

Draw a box-and-whisker style plot. The input data can take several different forms.

boxplot(data::AbstractVector{<:Real}; kwargs...)

Draws a single boxplot. Options in kwargs provide fine settings for the boxplot

boxplot(data::AbstractVector{<:Real}, grp::AbstractVector, ...) Use the categorical vector (made of integers or text strings) grp break down a the data column vector in cathegories (groups).

boxplot(data::AbstractMatrix{<:Real}; pos=Vector{<:Real}, ...) where pos is a coordinate vector (or a single location when data is a vector) where to plot the boxes. Default plots them at 1:n_boxes or 1:n_groups.

boxplot(data::GMTdatset{<:Real}; pos=Vector{Real}(), ...) Like the above case but the input data is stored in a GMTdataset

boxplot(data::Vector{Vector{<:Real}}; pos=Vector{Real}(), ...) Similar to the Matrix case but here each data vector used to compute the statistics can have a different number of points. There will be as many boxplots as length(data)

boxplot(data::Array{T<:Real,3}; pos=Vector{Real}(), groupwidth=0.75, ccolor=false, ...) Draws G groups of boxplots of N columns boxes. - groupWidth: Specify the proportion of the x-axis interval across which each x-group of boxes should be spread. The default is 0.75. - ccolor: Logical value indicating whether the groups have constant color (when fill=true is used) or have variable color (the default). - fill: If fill=true paint the boxes with a pre-defined color scheme. Otherwise, give a list of colors to paint the boxes. - fillalpha: When the fill option is used, we can set the transparency of filled violins with this option that takes in an array (vec or 1-row matrix) with numeric values between [0-1] or ]1-100], where 100 (or 1) means full transparency. - separator: If = true plot a black line separating the groups. Otherwise provide the pen settings of those lines. - ticks or xticks or yticks: A tuple with annotations interval and labels. E.g. xticks=(1:5, [“a”, “b”, “c”, “d”]) where first element is an AbstractArray and second an array or tuple of strings or symbols.

boxplot(data::Vector{Vector{Vector{<:Real}}}, ...) Like the above but here the groups (length(data)) can have a variable number of elements and each have its own size.

This module is a subset of plot. So not all (fine) controlling parameters are not listed here. For the finest control, user should consult the plot module.
Parameters

Examples

Create a boxplot with five boxes, name each, plot the outliers, colorize with the default color schema and add notches (this needs GMT >= 6.5).

using GMT
boxplot(randn(100,5), outliers=(size="5p",), ticks=["A","B","C","D","E"], fill=true, notch=true, show=true)

An horizontal boxplot with default colors, displaying outliers as 6p black stars. Noches are also shown but this requires GMT6.5.

using GMT
boxplot(randn(50,6), notch=true, fill=true, outliers=(size="6p",), hbar=true, show=1)