Clearing data in an axes component

4 次查看(过去 30 天)
Hi, Im using GUIDE to create graphs. I insert an "axes" component and label this axes2.
I can plot graphs (data = avg5) to this axes OK using
axes(handles.axes2)
h=bar(Avg5);
I want to include a clearall buttom and remove the graph data that I display but keep all of the axes and labels. Can anyone advise. thanks

采纳的回答

Oleg Komarov
Oleg Komarov 2011-5-4
delete(get(handles.axes2,'children'))
  1 个评论
Jason
Jason 2011-5-4
is it possible to keep the labels. They currently dissappear when the data goes: There is always 12 categories on the x-axis
axes(handles.axes2)
h=bar(Avg5);
colormap jet;
label ={'AC', 'AG', 'AT','CA','CG','CT','GA','GC','GT','TA','TC','TG'};

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by