plot differant data in the same axes

hi matlab community i'm working on a gui in matlab,and i have two push buttons each one of them plot in the same axe. how can i plot the data from the two buttons in the same axe without one graph erases the other. thank you for advance.

 采纳的回答

You should use the command
hold on
Then all your plots will stay on the same axes. But if you want to clear the graph after a while you should put this before you draw a new plot:
hold off

1 个评论

thank you.should i use this even in matlab gui code with different button

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by