how to change font size of bus number in graph
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have this graph
M=[1,2;3,4;4,1;2,3]
g = graph(M(:, 1), M(:, 2));
h = plot(g);
I have attached the graph here and want to change font of bus number.
0 commentaires
Réponse acceptée
Bhaskar R
le 4 Jan 2020
This answer can fullfill your requirement
In your case
M=[1,2;3,4;4,1;2,3]
g = graph(M(:, 1), M(:, 2));
h = plot(g, 'NodeLabe', {});
t = text(h.XData,h.YData,{'1','2','3','4'},'FontSize',14);
2 commentaires
Bhaskar R
le 4 Jan 2020
% change 4 to 100 for 100 nodes
t = text(h.XData,h.YData,strsplit(num2str(1:4)),'FontSize',14);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Directed Graphs dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!