Colouring of my Graph

조회 수: 3 (최근 30일)
Georgios Demetriou
Georgios Demetriou 2021년 10월 2일
댓글: Georgios Demetriou 2021년 10월 3일
So I have a graph of my imported messurements, and i would like to colour different parts of it with different colours. Any ideas??
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 10월 2일
Do you mean "graph" in the sense of "graph theory" ? Nodes and edges ?
Georgios Demetriou
Georgios Demetriou 2021년 10월 3일
So yeah, my graph is a collection of points.

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

답변 (1개)

Walter Roberson
Walter Roberson 2021년 10월 3일
If you just have a collection of points in terms of coordinates, and there is no ordering or connections, then use scatter() . The 4th parameter can have one color for every point.
If you have a collection of vertices and edges, then use a graph() object and specify NodeColor when you plot() https://www.mathworks.com/matlabcentral/answers/477504-how-to-choose-different-colors-for-nodes#answer_388996

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by