MATLAB Answers

Get mulitple figure handles

4 views (last 30 days)
Rafael Kübler
Rafael Kübler on 25 Jul 2016
Commented: Benjamin Kraus on 2 Aug 2016
Hello together,
I'd like to use the mouse, to select multiple figures and then somehow get the handles of all the selected figures. Is there a way to do this?
Thank you for your effort.


Show 1 older comment
Brendan Hamm
Brendan Hamm on 25 Jul 2016
Sure there are ways that you could do this, but likely there is something more to what you are trying to do which may have better solutions.
1. Do you want these to appear in the Base workplace or should these handles be used somewhere else?
2. Why would you not just create the handles at creation time?
3. Do you need them to each be a different variable?
4. What do you plan on doing with the "selected" figures after?
5. Should you be able to un-select a figure window?
Varun Gunda
Varun Gunda on 2 Aug 2016
It is my understanding that you want to select multiple figures using mouse and get the handles of multiple figures.
You can get the handle of the current figure using mouse by configuring the call back function and using the gcf command.
You can also create handles at the time of creating figures.
Benjamin Kraus
Benjamin Kraus on 2 Aug 2016
There is no way to "select" multiple figures simultaneously. There is only one active figure at a time, and no built-in notion of "selected" figures.
I agree with Brendan, more context about what you are trying to accomplish will help people propose workarounds.

Sign in to comment.

Answers (0)

Sign in to answer this question.