3D graph interactive control using checkboxes
조회 수: 10 (최근 30일)
이전 댓글 표시
I have a 3D graph and I would like to allow the user to control the visibility of certain elements (i.e labels,nodes and edges) by adding checkboxes. How do I start ?
Thank you.
채택된 답변
Benjamin Kraus
2018년 1월 5일
If you are using a recent MATLAB release, you may be able to get the functionality you are looking for using the ItemHitFcn built-in to the legend.
There is an example in the documentation that shows how to use ItemHitFcn to enable clicking on legend entries to toggle the visibility of items in your plot. Check it out here: Create Interactive Legends Using Callbacks.
댓글 수: 2
추가 답변 (1개)
Camille Fong
2018년 1월 8일
편집: Camille Fong
2018년 1월 8일
댓글 수: 2
Benjamin Kraus
2018년 1월 9일
I'm not sure why rotating your graph would have any effect on the Legend or ItemHitFcn.
Can you give more details, for example:
- What is preventing you from clicking on the legend after rotating the graph? What is happening when you try to click on the legend?
- What release of MATLAB are you using?
- Maybe show some example code?
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!