How to add transparency to a dendrogram
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. How to add a tranparency to a dendrogram?
% example
X = rand(10,3);
tree = linkage(X,'average');
dendrogram(tree)
Thank you
2 Kommentare
Antworten (1)
Adam Danz
am 17 Jan. 2020
Bearbeitet: Adam Danz
am 18 Jan. 2020
Set up the dendrogram and store the line object handles from the first output of dendrogram().
% Set up the dendrogram
X = rand(10,3);
tree = linkage(X,'average');
denHand = dendrogram(tree) % Get the line handles output
Set the transparency to 50% (or any other value between 0 and 1) by adding a 4th value to the RGB color vector using the color of the first line object as a base. This is an undocumented feature in Matlab.
% Set transparency of dendrogram lines
set(denHand, 'Color', [denHand(1).Color, 0.5])
To set transparency of the axes (is that what you want to do?),
set(gca, 'color', 'none') % completely transparent
set(gca, 'Color', [1 1 1 .5]) % same undocumented method listed above
0 Kommentare
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!