Displaying node name in a network graph
6 views (last 30 days)
Show older comments
Mariya B on 14 Apr 2016
Commented: jd net on 29 Sep 2018
I seem to have an issue in displaying the node names. My code goes as follows:
names = 1:295;
node_names=reshape(cellstr(num2str(names(:))),* size(names)); %%assigning node names
A = sprand( 295, 295, density );%%creating sparse random adjacency matrix
ax=axesm('mercator','MapLatLimit',[40 41],'MapLonLimit',[-74 -73]);
Thanks in advance
Mike Garrity on 14 Apr 2016
I think that it doesn't label them by default when the number of nodes gets bigger than some number. You can tell it that you really do want them by using the labelnode function.
It does get a bit "busy" though.
More Answers (0)
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!