フィルターのクリア

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

3 ビュー (過去 30 日間)
Abhay Aradhya
Abhay Aradhya 2017 年 6 月 8 日
コメント済み: Adam 2017 年 6 月 8 日
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 件のコメント
Adam
Adam 2017 年 6 月 8 日
You don't seem to be actually plotting any data in that code, just creating a subplot axes.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by