Question

Could someone please assist:

Is there a way to change font size of classregtree in matlab? How can I change the class labels?

Was it helpful?

Solution

Well, try this:

using an example from the docs:

load fisheriris;

t = classregtree(meas,species,...
             'names',{'SL' 'SW' 'PL' 'PW'})

I was able to get the property-inspector:

tr=view(t)
inspect(tr)

..what didnt help a lot...

Now I took the handles of all children of tr, that are text-elements:

allHandles=findall(tr,'Type','text') 

Next, I just changed the FontSize:

set(allHandles,'FontSize',16)

and there you go :) it is working!

To see and edit other properties, you could now use the inspect-method, as I was doing at my first try, but with the text-handles of course. normally, there should be all other properties available as for normal text-elements. Just check the docs for uicontrol + text.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top