How to plot multiple graphs by a GUI callback function?

4 vues (au cours des 30 derniers jours)
metro
metro le 12 Mar 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

Réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by