This enhancement has been incorporated in Release 2009b (R2009b). For previous product releases, read below for any possible workarounds:
The Bioinformatics Toolbox does not guarantee that the row labels are contained within the extent of the clustergram window. There are several options for workarounds.
One option is to increase the size of the clustergram figure window. This will create more space for the labels to be displayed.
A second option is to create a figure out of the clustergram and interactively decrease the width of the clustergram or change the row label font size. This can be done as follows:
1. Go to the menu bar of the clustergram object and navigate to File->Print to Figure. This will create a figure object whose properties you can modify.
2. On the Menu bar of the new figure, select Edit->Axes Properties.
3. In the Property Editor that opens up, choose "More Properties" and then find the "Position" subgrouping.
4. From here, you can modify the "width" component of "Position". This will decrease the width of the clustergram allowing row labels to display completely.
5. Alternatively, you may edit the font of the row labels by clicking on each TEXT object and modifying the font property.
A third option is to make the above changes programmatically. This requires grabbing a handle to the figure associated with the clustergram and then manipulating the figure properties.
First obtain the figure handle:
set(0,'ShowHiddenHandles','on')
allhnds = get(0,'Children');
cgfigidx = strmatch('Clustergram',get(allhnds,'Tag'));
cffighnd = allhnds(cgfigidx);
set(0,'ShowhiddenHandles','off')
if length(cffighnd)>1
warning('More than one clustergram handle found. Using most recent clustergram')
cffighnd = cffighnd(end);
end
Now modify the width of the axes:
fch = get(cffighnd,'Children');
fch = fch(strmatch('axes',get(fch,'Type')));
pos = get(fch,'Position');
newcgpos = pos{2}-[0 0 .2 0];
set(fch,'Position',newcgpos)
Alternatively, you could modify the font size of the TEXT objects in the clustergram:
set(0,'ShowHiddenHandles','on')
txtobj = findall(fch,'Type','Text');
set(txtobj,'FontSize',5)
To learn more about figure properties, please open the documentation by typing "doc" at the MATLAB command prompt and type "figure properties" in the Help Navigator Search Bar.
Best Answer