How to plot multiple graphs by a GUI callback function?

2 Ansichten (letzte 30 Tage)
metro
metro am 12 Mär. 2020
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

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by