MATLAB Answers

How to change the Rowlabels font to italics

1 view (last 30 days)
Devika N T
Devika N T on 12 Feb 2019
Commented: Munish Raj on 13 Mar 2019
Dear All,
I am working with clustergram function.
I have generated the clustergram, But I need the row labels (which is list of organism names) to be in italics.
Can some one help me.
load ('Data.mat');
C_sources={'D\_Glucose';'D\_Fructose';'N\_ACNAM';'N\_ACGAM';'D\_Galactose';'Ribose';'D\_Xylose';'L\_Arabinose';'D\_Glucosamine';'D\_Mannose';'D\_Mannitol';'Salicin';'Maltose';'Lactose';'Sucrose';'Cellobiose';'Trehalose';'Melibiose';'Maltotriose';'Amylose';'Starch\_str\_1';'Starch\_str\_2';'Starch';'Maltohexaose';'Amylopectin';'Xylan';'Inulin';'Arab\_triose';'Arab\_galactan';'Arab\_ xylan'};
Org_Name={'B.adolescentis ATCC 15703';'B.angulatum DSM 20098';'B.animalis lactis BB.12';'B.animalis lactis Bi 07';'B.animalis lactis Bl 04 ATCC SD5219 ';'B.animalis lactis CNCM I 2494';'B.animalis lactis DSM 10140';'B.animalis lactis V9';'B.bifidum BGN4';'B.bifidum NCIMB.41171';'B.bifidum PRL2010';'B.boum DSM 20432';'B.breve UCC2003 NCIMB8807';'B.catenulatum DSM 16992';'B.coryneforme DSM 20216';'B.dentium ATCC 27678';'B.gallicum DSM 20093 ';'B.kashiwanohense DSM 21854';'B.longum DJO10A';'B.longum E18';'B.longum NCC2705';'B.longum infantis 157F NC';'B.longum infantis ATCC 15697';'B.longum longum ATCC 55813';'B.longum longum BBMN68';'B.longum longum CCUG 52486';'B.longum longum JCM 1217';'B.longum longum JDM301';'B.mongoliense DSM 21395';'B.pseudocatenulatum DSM 20438';'B.pseudolongum subsp DSM 20099';'B.ruminantium DSM 6489';'B.scardovii JCM 12489';'B.stercoris JCM 15918';'B.thermacidophilum subsp DSM 15837';'B.thermophilum RBL67'};
K=clustergram(Data,'RowLabels',Org_Name, 'ColumnLabels',C_sources,'Colormap',redbluecmap);
P.S. : I need Org_Name to be in italics
Thank You

Answers (1)

Munish Raj
Munish Raj on 25 Feb 2019
The FontSize property in clustergram is hidden, so, set the ShowHiddenHandles property as 'on' so that you can see the hidden properties.
Here is the example code:
load filteredyeastdata
cgo = clustergram(yeastvalues(1:30,:),'Standardize','Row');
set(0,'ShowHiddenHandles','on')
% Get all handles from root
allhnds = get(0,'Children');
% Find hearmap axis and change the font size
h = findall(allhnds, 'Tag', 'HeatMapAxes');
set(h,'FontAngle','italic')
  2 Comments
Munish Raj
Munish Raj on 13 Mar 2019
That seems like a mch easier solution
Thank you

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by