BAR Graph

3 次查看(过去 30 天)
Atakan
Atakan 2011-3-28
Hi everyone, I have question about bar graph and GUI,
I have graph on my figure(GUI). I want to plot line with line function on one of them,but when I use line function,line function create it on another graph.(which I dont want on) How can I solve this problem?

采纳的回答

Walter Roberson
Walter Roberson 2011-3-28
After you create the plot that you do want to draw on to, use gca() to get the handle of the plot axis. Record that, and when you want to use line() to plot to that same axis, put the recorded axis number in as the first argument to line().
For example,
plot(rand(1,10));
handles.plotaxis = gca;
guidata(gcf, handles);
Then later,
handles = guidata(gcf);
line(handles.plotaxis, 1:10, exp(0:.1:1));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by