Hold plot after each push button press GUI

5 ビュー (過去 30 日間)
Tyler Murray
Tyler Murray 2016 年 12 月 13 日
コメント済み: Tyler Murray 2016 年 12 月 14 日
I am trying to implement a "hold on" feature in my gui where the user can select and set of data and plot it on the same graph as the previous data. I saw one forum on here that helped but I am running into an issue. The code is:
ah = findobj(0,'Type','axes','Tag','MyPlotAxes');
if isempty(ah)
fh = figure('Name','Simulation','NumberTitle','off');
ah = axes('Parent',fh, 'Tag', 'MyPlotAxes');
hold(ah, 'on');
end
plot(ah, x, y);
The two sets of data do plot on one graph, however the axes of the figure becomes pasted as the background of the GUI. I have tried redefining the axes specific to each plot but have had no luck.
  10 件のコメント
Tyler Murray
Tyler Murray 2016 年 12 月 13 日
This is my first time working with a GUI and I don't know how to do it any other way haha
Tyler Murray
Tyler Murray 2016 年 12 月 14 日
I'm all set I believe. It was because I wasn't specifying xlabel(axis, 'Words'). Thanks for everyone's help.

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

回答 (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