How do I create an interactive connected graph in MATLAB GUI
1 回表示 (過去 30 日間)
古いコメントを表示
I want to create a connected graph in Matlab GUI. All the nodes of the graph are buttons which changes its color when clicked. Adding the buttons in GUI is easy but how do I add the lines between any 2 nodes depending on the adjaceny matrix?
Example of such a graph:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151764/image.png)
2 件のコメント
回答 (1 件)
Sreeram Mohan
2015 年 7 月 7 日
Hi Jigar,
Have you tried looking at properties of the button i.e. set or get properties and may be there is one related to the current location of the pushbutton. You could use that to draw a line between the positions returned. I have not tried this but could be an approach to try !!
--sreeram
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!