How to change FontSize and FontWeight of labels using labeledge?
조회 수: 55 (최근 30일)
이전 댓글 표시
How to change FontSize and FontWeight of labels using labeledge?
s = [1 1 2 2 3];
t = [2 3 3 4 4];
G = graph(s,t);
h = plot(G);
labelText = {'ABC' 'DEF' 'GHI'};
labeledge(h,[1 1 2],[2 3 3],labelText)
댓글 수: 0
채택된 답변
Ankit Kumar
2019년 10월 22일
Hi Simone,
You can change the FontSize and FontWeight of edge labels using GraphPlot Properties
In your case for example,
s = [1 1 2 2 3];
t = [2 3 3 4 4];
G = graph(s,t);
h = plot(G);
labelText = {'ABC' 'DEF' 'GHI'};
labeledge(h,[1 1 2],[2 3 3],labelText)
h.EdgeFontSize = 14;
h.EdgeFontWeight = 'Bold';
댓글 수: 3
Steven Lord
2019년 10월 22일
You can customize node and edge labels with font properties, including NodeFontSize and EdgeFontSize, as of release R2018b.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!