필터 지우기
필터 지우기

How can I format individual edges in a directed graph?

조회 수: 4 (최근 30일)
Felipe  Schuback
Felipe Schuback 2017년 8월 1일
댓글: Felipe Schuback 2017년 8월 2일
Hi all -
I am plotting a directed graph, however the formatting is really important to get right so I can achieve the objectives in my assignment. However, I would need to format each edge individually. An edge will have certain formats if a certain condition is met.
How do I get different edge layouts in the same graph and plot it? I am not finding this anywhere on the internet. Is this possible?
All the best.
  댓글 수: 6
Steven Lord
Steven Lord 2017년 8월 2일
See the documentation pages to which I linked in my Answer; they show how to use highlight and property manipulation to do what you're asking.
Felipe  Schuback
Felipe Schuback 2017년 8월 2일
Thank you very much Steven! Much appreciated. Just one last question: is there a way to loop through the edges? I wanted to do something like loop through the edges, and if the edge has a certain length, format that individual edge a certain way. How can this be done?
Best.

댓글을 달려면 로그인하십시오.

채택된 답변

Steven Lord
Steven Lord 2017년 8월 1일
You can control some properties of the edge lines in the plot of a graph or digraph on a per-edge basis using the highlight function or by directly manipulating the properties of the GraphPlot object as the "Edge Line Width by Weight" example on this documentation page shows.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by