Main Content

maboxplot

Create box plot for microarray data

Description

maboxplot(MAData) displays a box plot of the values in the columns of microarray data MAData.

maboxplot(MAData,ColumnName) labels the box plot columns using ColumnName.

example

maboxplot(MAStruct,FieldName) displays a box plot of the values in the field FieldName in the microarray data structure MAStruct.

example

maboxplot(___,Name=Value) specifies additional options to customize the box plot using one or more name-value arguments in addition to the input arguments in previous syntaxes.

example

H = maboxplot(___) returns the handle of the box plot axes for any of the previous input argument combinations.

[H,HLines] = maboxplot(___) also returns the handles of the lines HLines used to separate the different blocks in the image.

Examples

collapse all

This example shows how to display box plots for microarray data.

Load the MAT-file, provided with the Bioinformatics Toolbox™ software, that contains yeast data. This MAT-file includes three variables: yeastvalues , a matrix of gene expression data, genes , a cell array of GenBank® accession numbers for labeling the rows in yeastvalues, and times , a vector of time values for labeling the columns in yeastvalues.

load yeastdata

Show the box plot of gene expression data.

maboxplot(yeastvalues,times);
xlabel('Sample Times');

Figure contains an axes object. The axes object with xlabel Sample Times contains 49 objects of type line. One or more of the lines displays its values using only markers

Use the gprread function to create a structure containing microarray data, and plot the data using name-value pair arguments of the maboxplot function.

madata = gprread('mouse_a1wt.gpr');
maboxplot(madata,'F635 Median - B635','TITLE', 'Cy5 Channel FG - BG');

Figure contains an axes object. The axes object with title Cy5 Channel FG - BG, xlabel Block, ylabel F635 Median - B635 contains 56 objects of type line. One or more of the lines displays its values using only markers

Input Arguments

collapse all

Microarray data, specified as a bioma.data.DataMatrix object, numeric array, or structure containing a field called Data that contains microarray data.

The values in the columns of MAData are used to create box plots. If it is a DataMatrix object, the column names are used as labels in the box plot.

Column names to use as labels in the box plot, specified as a character vector, string scalar, string vector, numeric scalar, numeric vector, or cell array of character vectors.

Data Types: double | char | string

Structure field name from the input MAStruct, specified a character vector or string scalar. The function uses the values from the field to create box plots.

If MAStruct is block-based, maboxplot creates a box plot of the values in the field for each block.

Note

If you provide MAStruct, without providing FieldName, the function uses the first element in the ColumnNames field of MAStruct.

Data Types: char | string

Microarray data, specified as a structure.

Data Types: struct

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: maboxplot(yeastvalues,times,Title="Microarray Data",Symbol="o") specifies the title and outlier symbol to use for the box plot.

Plot title, specified as a character vector or string scalar. The default value is FieldName.

Data Types: char | string

Flag to show notched boxes, specified as a numeric or logical true (1) or false (0). The default is false to show square boxes.

Data Types: double | logical

Symbol for outlier values, specified as a character vector or string scalar . The default value is "+".

Available symbols are as follows.

MarkerDescription
"o"Circle
"+"Plus sign
"*"Asterisk
"."Point
"x"Cross
"_"Horizontal line
"|"Vertical line
"square"Square
"diamond"Diamond
"^"Upward-pointing triangle
"v"Downward-pointing triangle
">"Right-pointing triangle
"<"Left-pointing triangle
"pentagram"Pentagram
"hexagram"Hexagram

Data Types: char | string

Box plot orientation, specified as "Vertical" or "Horizontal".

Data Types: char | string

Maximum whisker length as a function of the interquartile range (IQR), specified as a numeric scalar.

The whisker extends to the most extreme data value within WhiskerLength*IQR of the box. If WhiskerLength equals 0, then the function displays all data values outside the box, using the plotting Symbol.

Data Types: double

Name-value arguments of the boxplot function from Statistics and Machine Learning Toolbox™, specified as a string vector or cell array of character vectors.

Example: maboxplot(yeastvalues,times,boxplot=["MedianStyle","target","Colors","k"])

Data Types: string | cell

Output Arguments

collapse all

Handle of the box plot axes, returned as a handle.

Handles of the lines used to separate the different blocks in the image, returned as a handle array.

Version History

Introduced before R2006a