Prev: can the following code be improved?(run faster)
Next: Reading variables from base workspace into a GUI?
From: William on 9 Jun 2010 18:42 hi, i am creating a gui with a timer that will plot something whenever the timer function is called. The problem is that my data is plotting to a new figure instead of the gui. This is what i have in my opening function: function testplot_gui_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; handles.tmr = timer('TimerFcn',{@TmrFcn},'BusyMode','Queue','ExecutionMode',... 'FixedRate','Period',1); start(handles.tmr); guidata(hObject, handles); For the sake of simplicity my timer function looks like this: function TmrFcn(hObject,eventdata,handles) %Timer function plot(rand()*5) is there a way to set the current figure to the axes located within the gui? thank you! |