# How to plot a graph without intersecting edges?

조회 수: 1(최근 30일)
Dominik Mattioli 2018년 7월 29일
편집: Dominik Mattioli 2018년 7월 29일
Can you input nodal coordinates to the graph generating function or specify in the plotting function to not have intersecting edges when plotting a graph?
% Random triangulation.
dt = delaunayTriangulation(rand(101,2));
edges = unique(sort(... % Unique mx2 list of
[dt.ConnectivityList(:,1:2);... % all edges in dt.
dt.ConnectivityList(:,2:3);...
dt.ConnectivityList(:,[3 1])],...
2),'rows');
figure; triplot(dt);
% Convert dt to graph, plot.
g = graph(edges(:,1),edges(:,2));
figure; g.plot;
I'm dealing with triangulations but I'd like to use the graph class to change the triangulation for various reasons, which is why I'm converting to a graph.

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

### 범주

Find more on Graph and Network Algorithms in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by