Colouring of my Graph

3 次查看(过去 30 天)
Georgios Demetriou
Georgios Demetriou 2021-10-2
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