matlab gui showing axis at the background
Show older comments

I am trying to plot some data using timer function on a seperate figure. Somehow I always get stucked by axis showing up at the background of my GUI?
function yeahwhatever_OpeningFcn(hObject, eventdata, handles, varargin)
handles.a = timer('ExecutionMode','fixedRate','Period',5,'TimerFcn',@pushbutton1_Callback);
start(handles.a)
handles.output = hObject;
guidata(hObject, handles);
function varargout = yeahwhatever_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function pushbutton1_Callback(hObject, eventdata, handles)
hold on
f = figure();
H = axes('Parent',f);
conn = database('', '', '', 'org.sqlite.JDBC', 'jdbc:sqlite:C:\Users\Uchiha Madara\Desktop\New folder (2)\PedelecManager\Server\sample.db');
curs = exec(conn,'select table1.XAchse from table1');
curs1 = fetch(curs)
data2=curs1.Data;
plot(H,data2);
drawnow()
Accepted Answer
More Answers (0)
Categories
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!