How to remove top dendogram from clustergram plot

조회 수: 1 (최근 30일)
Opt User
Opt User 2017년 6월 29일
답변: Adam Danz 2020년 11월 3일
Basically I want to cluster both along the rows and columns with clustergram(), but I cannot find a way to hide the top dendodogram in the final plot.

답변 (1개)

Adam Danz
Adam Danz 2020년 11월 3일
"I cannot find a way to hide the top dendodogram in the final plot."
% create clustergram
rng('default')
cg = clustergram(rand(10,10));
% Get figure handle
cgfig = findall(0,'type','figure', 'Tag', 'Clustergram');
% Get dendrogram axes
dendroAxRow = findall(cgfig,'Tag','DendroRowAxes');
dendroAxCol = findall(cgfig,'Tag','DendroColAxes');
% Set their visibility to off
set(dendroAxRow.Children, 'Visible', 'off')
set(dendroAxCol.Children, 'Visible', 'off')
% Alternatively, delete them:
% delete(dendroAxRow)
% delete(dendroAxCol)
Before and after:

카테고리

Help CenterFile Exchange에서 Expression Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by