How can I delete a plot among many plot in one figure?

조회 수: 659 (최근 30일)
tqy
tqy 2012년 9월 21일
댓글: Voss 2022년 12월 6일
Hi everyone,
I plot twice in one figure by using the hold on, but I find my 2nd plot is wrong. So I have to delete the 2nd plot, but I don't want delete the 1st one nor do I want to plot them again. Is there any methods?
Thanks a lot~~~

채택된 답변

Thomas
Thomas 2012년 9월 21일
This thread might help (If you have plotted the two separately ) http://www.mathworks.com/matlabcentral/answers/1444-clear-one-plot-in-multiple-hold-figure
h1=plot(1:4)
hold on
h2=plot(2:8)
delete(h2)
Or use the findobj to find the second plot and delete it.
doc finobj
  댓글 수: 2
Umair  Ahmed
Umair Ahmed 2020년 6월 22일
Is there a way to bring back a signal after deleting it? or if we can use plot/unplot all the signals in the plot by using something like a check mark?
Rik
Rik 2020년 6월 22일
(just to avoid a double thread with the same question, I replied in the other thread this was posted)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Wayne King
Wayne King 2012년 9월 21일
편집: Wayne King 2012년 9월 21일
Click "edit plot" -- the arrow next to the printer icon.
Then, click on the line you want to delete and then delete it.
Another way, is to click on the line you want to delete and then with that line selected.
>> h = gco;
>> delete(h)
  댓글 수: 3
Orion Smedley
Orion Smedley 2022년 12월 6일
As in on the menu bar with : " File Edit View Insert Tools Desktop Window Help"
That edit?
Doesn't seem to work.
Voss
Voss 2022년 12월 6일
@Orion Smedley: "Edit Plot" is the first item under the "Tools" menu.
Wayne King was saying how to access it from the toolbar. It's a white arrow/pointer, and it's located in different places in different MATLAB versions.

댓글을 달려면 로그인하십시오.

카테고리

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