How to change the Rowlabels font to italics

조회 수: 2 (최근 30일)
Devika N T
Devika N T 2019년 2월 12일
댓글: Munish Raj 2019년 3월 13일
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

답변 (1개)

Munish Raj
Munish Raj 2019년 2월 25일
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
Devika N T
Devika N T 2019년 3월 13일
Thank You ..
Instead I Used --"\it"
For eg:
Org_Name= {'{\it B.adolescentis} ATCC 15703';'{\it B.angulatum} DSM 20098'};
Munish Raj
Munish Raj 2019년 3월 13일
That seems like a mch easier solution
Thank you

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Management에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by