Documentation Center 
Set property of clustergram object
set(CGobj)
set(CGobj, 'PropertyName')
set(CGobj, 'PropertyName', PropertyValue)
set(CGobj, 'Property1Name', Property1Value,
'Property2Name', Property2Value,
...)
CGobj  Clustergram object created with the function clustergram. 
PropertyName  Property name for a clustergram object. 
Note: You cannot set the properties of a clustergram object if you created it using the Export Group to Workspace command in the Clustergram window. 
set(CGobj) displays possible values for all properties that have a fixed set of property values in CGobj, a clustergram object.
set(CGobj, 'PropertyName') displays possible values for a specific property that has a fixed set of property values in CGobj, a clustergram object.
set(CGobj, 'PropertyName', PropertyValue) sets the specified property of CGobj, a clustergram object.
set(CGobj, 'Property1Name', Property1Value, 'Property2Name', Property2Value, ...) sets the specified properties of CGobj, a clustergram object.
Properties of a Clustergram Object
Property  Description 

RowLabels  Vector of numbers or cell array of text strings to label the rows in the dendrogram and heat map. Default is a vector of values 1 through M, where M is the number of rows in Data, the matrix of data used by the clustergram function to create the clustergram object. 
ColumnLabels  Vector of numbers or cell array of text strings to label the columns in the dendrogram and heat map. Default is a vector of values 1 through N, where N is the number of columns in Data, the matrix of data used by the clustergram function to create the clustergram object. 
Standardize  Numeric value that specifies the dimension for standardizing the values in Data, the matrix of data used to create the clustergram object. The standardized values are transformed so that the mean is 0 and the standard deviation is 1 in the specified dimension. Choices are:

Cluster  Numeric value that specifies the dimension for clustering the values in Data, the matrix of data used to create the clustergram object. Choices are:

RowPdist  String that specifies the distance metric to pass to the pdist function (Statistics Toolbox™ software) to use to calculate the pairwise distances between rows. For information on choices, see the pdist function. 
ColumnPdist  String that specifies the distance metric to pass to the pdist function (Statistics Toolbox software) to use to calculate the pairwise distances between columns. For information on choices, see the pdist function. 
Linkage  String or twoelement cell array of strings that specifies the linkage method to pass to the linkage function (Statistics Toolbox software) to use to create the hierarchical cluster tree for rows and columns. If a twoelement cell array of strings, the first element is used for linkage between rows, and the second element is used for linkage between columns. For information on choices, see the linkage function. 
Dendrogram  Scalar or twoelement numeric vector or cell array that specifies the 'colorthreshold' property to pass to the dendrogram function (Statistics Toolbox software) to create the dendrogram plot. If a twoelement numeric vector or cell array, the first element is for the rows, and the second element is for the columns. For more information, see the dendrogram function. 
OptimalLeafOrder  Property to enable or disable the optimal leaf ordering calculation, which determines the leaf order that maximizes the similarity between neighboring leaves. Choices are true (enable) or false (disable). 
LogTrans  Controls the log_{2} transform of Data, the matrix of data used to create the clustergram object, from natural scale. Choices are true or false. 
Colormap  Either of the following:

DisplayRange  Positive scalar that specifies the display range of standardized values. For example, if you specify redgreencmap for the 'ColorMap' property, pure red represents values ≥ DisplayRange, and pure green represents values ≤ –DisplayRange. 
Symmetric  Property to force the color scale of the heat map to be symmetric around zero. Choices are true or false. 
Ratio  Either of the following:
It specifies the ratio of space that the row and column dendrograms occupy relative to the heat map. If Ratio is a scalar, it is used as the ratio for both dendrograms. If Ratio is a twoelement vector, the first element is used for the ratio of the row dendrogram width to the heat map width, and the second element is used for the ratio of the column dendrogram height to the heat map height. The second element is ignored for onedimensional clustergrams. 
Impute  Any of the following:

RowMarkers  Optional structure array for annotating the groups (clusters) of rows determined by the clustergram function. Each structure in the array represents a group of rows and contains the following fields:

ColumnMarkers  Optional structure array for annotating groups (clusters) of columns determined by the clustergram function. Each structure in the array represents a group of rows and contains the following fields:

Load the MATfile, provided with the Bioinformatics Toolbox™ software, that contains filtered yeast data. This MATfile 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 filteredyeastdata
Create a clustergram object and display the dendrograms and heat map from the gene expression data in the first 30 rows of the yeastvalues matrix and standardize along the rows of data.
cgo = clustergram(yeastvalues(1:30,:),'Standardize','row')
Clustergram object with 30 rows of nodes and 7 column of nodes.
Use the set method and the genes and times vectors to add meaningful row and column labels to the clustergram.
set(cgo,'RowLabels',genes(1:30),'ColumnLabels',times)
Reset the colormap of the heat map to redbluecmap.
set(cgo,'Colormap',redbluecmap);
clustergram  get  plot  view