figure to plot a table and a GUI axes

조회 수: 9(최근 30일)
Alex 2013년 11월 27일
편집: Alex 2013년 11월 27일
Hi everyone, I got some trouble in my GUI. I display a table with datas, and I would like display a plot of my datas in a new window. In my opening of my GUI i display my table, it's works well
function CQGraph_OpeningFcn(hObject, eventdata, handles, varargin)
global numCapteur
numCapteur =1;
global nomCapteur
nomCapteur= varargin{1};
global infra
infra= varargin{2};
global tabStat
tabStat = varargin{3};
global dateNumSynchro
dateNumSynchro= varargin{4};
handles.output = hObject;
guidata(hObject, handles);
%tableau de données
set(handles.tableauData, 'Data', tab);figure(gcf)
set(handles.menuCapt, 'String',nomCapteur);figure(gcf)
set(handles.tabStat, 'Data', tabStat(numCapteur,:));figure(gcf)
And now I would like to plot my table, but my problem is that I don't know if I should make a new GUI, or if I make a new figure. If I use a new figure and plot it there are the toolbar which is very usefull (save, zoom, data cursor, brush...) but I can't add button to change datas. while if I make a new GUI with axes I can use buttons and others tool from GUI...
So I d'ont know how I can use both, that is get my plot with the toolbar of save, zoom, data cursor, brush... and add button from the GUI toolbox
And another question if in my callback of a button I create a new figure:
h = figure('Name','Graph Min Max Avg Std')
hleg =legend('MAX','MIN','STD','AVG',...
when I push the button a new figure is create, but I would like to refresh the old figure, note create a new as you can see on the image linked... How can I do it?
Thank you for your help



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!

Translated by