How to make a circular graph (node connections)?

조회 수: 23 (최근 30일)
Akshar Agarwal
Akshar Agarwal 2020년 7월 7일
답변: Kelly Kearney 2020년 7월 9일
I've got my data formatted for use with the digraph plots, but I'd like it to look more like this: https://i.pinimg.com/originals/c6/1c/a2/c61ca29de6c768fe048eca1fe3b48afc.png
Any ideas?

답변 (2개)

Steven Lord
Steven Lord 2020년 7월 7일
Use the layout function to layout your digraph using the 'circle' layout.
  댓글 수: 1
Akshar Agarwal
Akshar Agarwal 2020년 7월 9일
That's not really what I meant. Is there a way to make the chord diagram "prettier", like the example provided? I currently have to do this in R but it'd be nice to have it all in Matlab.

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


Kelly Kearney
Kelly Kearney 2020년 7월 9일
The short answer is that you can indeed make these in Matlab, but it's not simple.
You basically need to recreate the calculations for edge paths from d3's chord diagram layout code (R's chorddiag is a wrapper around that library), then plot said paths as either line or patch objects (I prefer patches because they make it easier to customize the edge width and color and add transparency).
Alternatively, you can code it in javascript and render it in an html window via Matlab's web command. Definitely not for the faint of heart... :-)
I could probably demonstrate (the all-Matlab version) if you have a simple example dataset.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by