People often make their own GUIs in GUIDE and they have a data visualization. When you embed an axis in your own GUI rather than using a figure window, you lose the built in toolbar that has zoom, pan, and other goodies. You can add the widgets you want back into your GUI very easily, or even make your own custom tools for the toolbar. This short video shows you how.
Nicey nice. Another feature which isn’t so important you break your skull finding yourself, but allways felt that you really should find out how to do.
I have created a GUI which displays two axes. However I only want the zoom tool to be used on one of them. (I tried using zoom off, but turns the zoom tool off on both axes!) Do you know how I can achieve this?
It does not seem possible to add an ‘plot edit’ button in this way. I would like to be able to select objects plotted in the axes in my GUI. In a GUI using R14, I built a ‘plot edit’ button using the commond ‘plotedit on’, but in R2008a this does not work — it disables all my GUI buttons.
Hi Doug,
Sorry this may not be the right place to ask this question. But I really find it one of the very few impossible things to do with Matlab. I’m trying to build a GUI, with a button which if clicked will open the Matlab arrayeditor and allow the user to edit some data. But as all the halting functions, like ‘pause’, ‘waitfor’ or ‘uiwait’ will take us somewhere outside the current workspace, it won’t work. There would be nothing in the arrayEditor window. I’d like some function that would hold the program right there like what we’d have with a breakpoint in debugging mode. Is it even possible? Thanks!
You might want to try working with UITABLE instead – just wrap it in a figure. A caution – UITABLE was released in R2008A. Earlier versions (back to MATLAB 7/R14) have an undocumented version of UITABLE that works, but which is not compatible with the new version.
Hey this was really useful.
Thank you so much. Your vides are *SOO* helpful. I must have spent easily 1-2 hrs on reading things but referring to your videos speeds up everything :)
thanks !
I’d like to ask a question. When I click Data Cursor, and I click on the image, the coordinate will be shown. How do i get the value of X coordinate n Y coordinate? Let’s say I want to display the coordinate on text or something and it will update the value every time I click on the image. Thank you in advance. ;]
I would create a DATACURSORMODE object and set its UpdateFcn property to be a function that not only computes the string for the data cursor itself but also display the coordinate in a text box, or does whatever other processing you want to be performed when you click on the image.
Is there any capability to add the contrast adjust button, such as the one available using imtool? This would be really useful for me (and others I presume)
Nicey nice. Another feature which isn’t so important you break your skull finding yourself, but allways felt that you really should find out how to do.
–DA
Hi Doug,
This proves to be an excellent video.
But can u please tell the version of MATLAB which has a toolbar edit option in it?
This video was made with 2008a.
Doug
Hi Doug,
I was wondering if you could help me out?
I have created a GUI which displays two axes. However I only want the zoom tool to be used on one of them. (I tried using zoom off, but turns the zoom tool off on both axes!) Do you know how I can achieve this?
Thank you
Rachel
Hi Rachel,
Take a look at Example 3 here:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zoom.html
jiro
Sharina might like to know that toolbar editing was introduced to GUIDE in MATLAB Version 7.5 (R2007b).
Doug, thank you very much. You posts are very useful
Doug,
It does not seem possible to add an ‘plot edit’ button in this way. I would like to be able to select objects plotted in the axes in my GUI. In a GUI using R14, I built a ‘plot edit’ button using the commond ‘plotedit on’, but in R2008a this does not work — it disables all my GUI buttons.
Thanks,
Kaj
Hi Doug,
Sorry this may not be the right place to ask this question. But I really find it one of the very few impossible things to do with Matlab. I’m trying to build a GUI, with a button which if clicked will open the Matlab arrayeditor and allow the user to edit some data. But as all the halting functions, like ‘pause’, ‘waitfor’ or ‘uiwait’ will take us somewhere outside the current workspace, it won’t work. There would be nothing in the arrayEditor window. I’d like some function that would hold the program right there like what we’d have with a breakpoint in debugging mode. Is it even possible? Thanks!
Shakeham –
You might want to try working with UITABLE instead – just wrap it in a figure. A caution – UITABLE was released in R2008A. Earlier versions (back to MATLAB 7/R14) have an undocumented version of UITABLE that works, but which is not compatible with the new version.
- scott
Hey this was really useful.
Thank you so much. Your vides are *SOO* helpful. I must have spent easily 1-2 hrs on reading things but referring to your videos speeds up everything :)
thanks !
Surbhi,
Glad to help. Thanks for the feedback!
-Doug
Hi doug!
I’d like to ask a question. When I click Data Cursor, and I click on the image, the coordinate will be shown. How do i get the value of X coordinate n Y coordinate? Let’s say I want to display the coordinate on text or something and it will update the value every time I click on the image. Thank you in advance. ;]
Zuhairi,
I would create a DATACURSORMODE object and set its UpdateFcn property to be a function that not only computes the string for the data cursor itself but also display the coordinate in a text box, or does whatever other processing you want to be performed when you click on the image.
The feature demonstrated here only works with MATLAB Version 7.5 (R2007b) or newer. I have R2006b and cannot use this feature.
[ref: http://www.mathworks.com/access/helpdesk/help/techdoc/rn/bq9954l-1.html
Is there any capability to add the contrast adjust button, such as the one available using imtool? This would be really useful for me (and others I presume)
Thanks,
Jim
@Jim,
>>imshow(‘pout.tif’)
>>imcontrast
You can run the tool directly. With this command, you can call the tool up in any manner you like.
Doug