From: Wendy on
Hi all,

I am plotting a dendrogram, but the dendrogram labelling are two big, so everything overlaps. Is there a way I can change the font size of the dendrogram labelling. My code is

h=dendrogram(Z,0,'labels',names);

I tried
set(h,'FontSize',6), but it did not work, and gives me an error saying "??? Error using ==> set
Invalid handle object".

Thank you,
Wendy
From: Tom Lane on
> h=dendrogram(Z,0,'labels',names);
>
> I tried set(h,'FontSize',6), but it did not work, and gives me an error
> saying "??? Error using ==> set
> Invalid handle object".

Wendy, that's because h is an array of handles for the lines. You need to
change the font size associated with the axes. Here's a simple way:

set(gca,'FontSize',6)

This will change the y-axis font size as well. If that's no good, an
alternative would be to remove the x axis tick labels and write your own
text there. But that would be more involved.

-- Tom