How to plot multiple graphs by a GUI callback function?

4 ビュー (過去 30 日間)
metro
metro 2020 年 3 月 12 日
Hi, thank you always for your support.
On a GUI window, I am trying to plot multiple graphs from a matrix form, each column of which is a data to be plotted.
I wrote a callback function as below, but the handler could plot just one graph in each call back.
Is there any good way to circumvent this?
Thank you in advance:)
hp = uipanel('Title','title','FontSize',12, 'FontWeight', 'bold',...)
handler.haxp = axes('Units','normal', 'Position', [...], 'Parent', hp);
handler.plot_handle = plot(handler.haxp, x, data);hold(handler.haxp,'on');
handler.plot_handle = plot(handler.haxp, x(1), data(1), 'xr','linewidth',2);
set(get(handler.haxp_image,'Children'),'ButtonDownFcn',@plot_graph);
function plot_graph(varargin):
set(hh.plot_handle, 'YData', data); hold(hh.haxp, 'on')
end

回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by