From: Wendy on
Hi,

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: Peter Perkins on
On 1/30/2010 4:39 PM, Wendy wrote:
> Hi,
> 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".

I believe you want the axes handle returned by gca, not the handle returned by DENDROGRAM. As described in the help, that's a handle to the lines in the plot.

Hope this helps.