How can i plot on axes on a GUI when click on a push button on another GUI?
5 views (last 30 days)
Show older comments
Le Dung on 10 Jan 2019
Commented: nadia ansari on 5 Nov 2020
i have two GUIs with an axes on GUI1 and a push button on GUI2. Now, i want to plot in axes on GUI1 by cliking in the button on GUI2 with the informations in the GUI2
how can i do ?????
I tried a code below: (in function_callback of push button on GUI2)
findaxes = findobj('Tag','modelspace') % modelspace is Tag property of axes on GUI1
plot(findaxes,data from GUI2)
But, matlab return:
0x0 empty GraphicsPlaceholder array.
Error using plot
Vectors must be the same length.
Error in inputpoint>ok_Callback (line 131)
Error in gui_mainfcn (line 95)
Error in inputpoint (line 42)
Error in @(hObject,eventdata)inputpoint('ok_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
Please help me!
Thank you so much
Kevin Phung on 11 Jan 2019
target_axes = findobj(groot,'Tag','modelspace')
hope this helps!
Find more on Interactive Control and Callbacks 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!