필터 지우기
필터 지우기

How to plot this picture use matlab?

조회 수: 1 (최근 30일)
z cy
z cy 2020년 5월 20일
댓글: z cy 2020년 5월 23일

채택된 답변

Steven Lord
Steven Lord 2020년 5월 21일
On the documentation page for the plot method of graph objects see the "Custom Graph Node Coordinates" example for how to plot nodes of your graph in specific locations.
The documentation page describing various types of customization you can do to a plotted graph may also be of use to you.

추가 답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 5월 20일
Try this code
s = randi([1 100], 1, 2000);
t = randi([1 100], 1, 2000);
G = graph(s, t);
p = plot(G, 'Layout', 'subspace');
p.NodeLabel = [];
p.MarkerSize = 10;
p.NodeCData = 1:100;
p.EdgeColor = [0.5 0.5 0.5];
colormap(autumn)
colorbar
  댓글 수: 5
Ameer Hamza
Ameer Hamza 2020년 5월 21일
편집: Ameer Hamza 2020년 5월 21일
Do you have the code to create the adjacency matrix? Also, do you want to use custom coordinates for the node position?
z cy
z cy 2020년 5월 23일
yes. Thank you!

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

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by