Thank you for the response. Regarding switching from one inset to another, indeed, 'tab' does activate the next inset, regardless of the axes; however, the situation I envision is having say, three insets on one subplot, two insets on another subplot, three insets on yet a third subplot--for whatever reason and despite aesthetics. Maybe now the problem becomes evident. If, say, I am on the third subplot and the 8th inset, in order to access the 7th inset, I have either to (i) cycle through the other 7 insets, or (ii) use my mouse to double-click. I, personally, like shortcuts and avoid using my mouse (habit), thus, I find it more convenient to cluster my insets by axis and, for the active axes, I cycle between my 'local' insets. Further, depending on the order of placing insets on whatever axes, two insets on an axes may not be next to each other in the 'tab' order. Third, a shortcut for activating axes allows for placing insets, not necessarily even activating insets, on different axes, without mouse-clicks. And finally, I usually do most things GUI-based, in which I provide tags for each axes/inset and then provide dialogs (e.g., listboxes, etc) to allow the user to select specific axes and/or insets for manipulation. But, of course, this is my preference.
As for other notes:
(i) I like shortcuts, but, for other users, they love their mouse. Hence, an easy extension is simply to provide a 'uicontextmenu' for each created axes, in which the menu, say, for the 'magnifier' provides the various shortcuts/commands particular to that axes (resize, magnification, etc), and similarly for the inset. A user may then right-click an inset and simply select to resize or expand or whatever. And further, by listing 'Increase X-Mag (alt++)', or whatever the shortcut is, the user has a reference to remind his/herself of the various shortcuts.
(ii) Another extension may be the ability to synchronize two insets. For example, suppose I have two subplots and one inset per subplot. Further, the two subplots contain related information, and I would like to magnify a single region in both subplots. In this implementation, I have to individually drag each magnifier to the desired region separately, and then manually attempt to align the two axes. This may, or may not, be easy depending on the length of the displayed data and the resolution of the axes. A nice extension would be (yet another shortcut!) to link two insets together, such that they move in step. A similar concept has been implemented by 'Dual Cursors', which may be found on the Central File Exchange. Or, another possibility is two insets on the same axes, but separated by a given spacer. If I link them, then when I move one axis to the left by 10 units, the second axis also moves to the left exactly 10 units. Similarly for magnification, resizing, et cetera. Hence, having the ability to apply shortcuts/operations to more than one inset at a time, accomplished either using 'loops' or the 'set' function. Of course, if performance was already an issue, this suggestion would only compound matters.
Thanks again for the fixes and comments. Great work.
(i) Hack: in order to delete the magnifier, secondary axes, and link, I simply added a new keyboard shortcut (alt+C), and then directed to a sub-function which deleted the desired axes handles and restored the figure and main axes default settings.
(ii) Problem: I have noticed the following correlation. When the figure window is small, say, 10 in x 8 in, the magnification, motion, and shortcuts work wonderfully. This changes, however, when I expand the figure window so it is maximized (i.e., roughly, 24 in by 11 in). Each time I attempt to used the magnification function on the expanded figure window, my Matlab session crashes, and if this system is able to remain responsive, I receive repetitive warnings that I have exceeded by 'listener recursion limit'. This issue is not alleviated when I reset the recursion limit to something extreme (e.g., from 500 to 10000). Hence, something within the configuration, perhaps the 'buttonmotionfcn' or some other callback which continuously updates/has eventdata, seems to find the increased window size rather disagreeable.
This stated, I was curious if you have a possible workaround for issue (ii).
(iii) Generalization: a nice, albeit more complicated, addition would be the ability to incorporate more than one plot inset for a given axes and/or figure. Possibly, by including another shortcut command, one could cycle between making a given secondary axes/magnifier active and inactive. For example, store all axes within a figure, and then upon the shortcut command, provide a 'listdlg' to allow the user to choose which axes to make active (which may or may not be a magnifier). If a magnifier axes is selected, then make the associated handles active, et cetera.
The function has outstanding functionality and use, and I am eager to have it fully and smoothly incorporated in my GUI. Thank you for this submission.
One other inquiry: is it possible to add tabs programmatically? I realize one may delete a tab using the command line, but the addtion of tabs seems to run only through the TabPanel interface. A nice feature would be the addition and deletion of tabs at a click, much like a browser interface. Any possibility this may be added in the future?
I am currently having difficulties with the enabling and disabling of tabs, using the tabselectionfcn. I have attempted to input the function arguments as documented in the corresponding m-file, but to no avail. To ensure that my syntax is correct, would you be willing to supply an example for enabling and/or disabling a tab? Thank you in advance.
I spent 10 minutes trying to make this video work. No luck.
What is the use of the video if half of the customers were not able to watch it... See the comments below.
MathWorks seems to be very much detached from Matlab users community.