Borrar filtros
Borrar filtros

How do I refresh data in an axes in Matlab GUI?

3 visualizaciones (últimos 30 días)
Abhay Aradhya
Abhay Aradhya el 8 de Jun. de 2017
Comentada: Adam el 8 de Jun. de 2017
I am trying to update a graph every time the value of variable "sectors_all" changes or the button "select" is pressed.
How do I change the data on the graph without creating a new UI every time?
userInterface = figure('Name','Solution selector window');
flightDataPlotPosition = [.1 .5 .375 .4];
ax = axes('Parent',userInterface,'Position',flightDataPlotPosition);
hold on
subplot(ceil(sqrt(size(sectors_all,1))),ceil(sqrt(size(sectors_all,1))),1, 'Position',flightDataPlotPosition);
hold on;
topPanel = uipanel(userInterface,...
'Position',[0 .95 1 .05]);
% Code for select button in the top panel
selectButton = uicontrol('Parent',topPanel,'Style','pushbutton','String',"Select",...
'Units','normalized',...
'Position',[.325 .25 .05 .5],...
'Callback', @selectSolution);
% callback function for select button in the top panel
function selectSolution(source,event)
display('select button pressed')
end
  1 comentario
Adam
Adam el 8 de Jun. de 2017
You don't seem to be actually plotting any data in that code, just creating a subplot axes.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by