Plotting pie charts over GraphPlot
이전 댓글 표시
Hi,
I want to plot pie-charts over the nodes of a graph plotted as a GraphPlot object such that the middle of the pie sits exactly at the node.
Hence, I want to do something like this
s = [1 1 1 1 2 2 3 4 4 5 6];
t = [2 3 4 5 3 6 6 5 7 7 7];
G = graph(s,t);
p = plot(G);
and then add an axes and plot a pie chart over one of the nodes with
axes('Position',[?, ?, pie_size, pie_size]);
X = [1 0.5 2.5 2]; pie_chart = pie(X, repmat({''},size(X)));
The ? represent the coordinates of the new plot inside the graph plot.
While I can read out the coordinates of the nodes in the graph plot from p.XData and p.YData, these seem to be relative to the center of the plot in units which are incompatible to any available unit system in the axes function.
Does anyone know of a way to accomplish what I want (possibly also in a different way)?
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Pie Charts에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


