increasing the fontsize of the y-label tickmarks on a dendrogram/tree
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I created a dendrogram where the x-axis is the distance/dissimilarity between clusters and the y-axis are the objects. I want to increase the font size, but only the x-axis objects are increased, the y-axis labels remain the same. How do I do this?
6 Commenti
Adam Danz
il 29 Mag 2020
I can provide a quite answer as soon as I have a working example that produces your plot (or you could attach the figure file).
Risposta accettata
Adam Danz
il 29 Mag 2020
Your y-labels aren't really tick labels. They are text objects. You need to store their handles and set their fontsize directly.
textLabels = gobjects(size(ulab)); % PREALLOCATE HANDLES VECTOR
for k = 1:numel(ulab)
% [ YOUR OTHER CODE GOES HERE] ....
textLabels(k) = text(x,loc(ind),lab(ind),'Color',clr(k,:)); % STORE EACH HANDLE
end
Then change fontsize
set(textLabels,'FontSize', 18)
However, the whole approach seems inefficient.
Instead of defining the labels at the top of your code and then change the labels within the loop, just set the labels correctly before making the plot. That way your lables are actual y-tick labels and will respond to set(gca,'fontsize',18).
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!