How do I plot data from one gui on another gui?
3 views (last 30 days)
Show older comments
Hello,
For starters I have two gui's. The first gui displays a plot on an axis, and the second gui has a variety of push buttons. Each of these push buttons has a value, and I want to display a vertical line that goes from "y1 = 0" and "x1 = 0" to "y2 =10" and "x2 = the push button value". I am wondering how to send the name of the axis on the first gui to the second gui, and then allow the second gui to plot on the first gui.
Also I want to be able to click on multiple push buttons and have them display a line on the same figure. If there is a simple way to do this I would be much obliged. Thank You -Eric
0 Comments
Accepted Answer
Image Analyst
on 9 Feb 2013
Why not combine them all in one single GUI? Otherwise, see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
2 Comments
Image Analyst
on 11 Feb 2013
It's these kind of complications why I never do multiple separate figures in my GUIs. All my GUIs are a single figure. I'm not sure what you mean when you say "if there is a way to produce multiple figures in the same GUI I would be more than relieved to do it that way." That's the way you're doing it now. Your GUI is composed of multiple, separate figures, where it's difficult to communicate between them because they ARE separate. Did by chance you mean axes instead of figures? I don't like having separate figures in my GUI because sometimes some of the figures get obscured by other windows and they can be moved around to all kinds of crazy positions that don't make sense, and it's hard to communicate between them because they don't have each others variables, yet you want to control one figure from another so it's those variables that you need. Anyway, if you're going to do it the hard way, you're on your own because I do it the easy way, and am not that familiar with the hard way.
More Answers (0)
See Also
Categories
Find more on Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!