필터 지우기
필터 지우기

Adding Lines to Several Plots

조회 수: 3 (최근 30일)
Tim Mottram
Tim Mottram 2012년 9월 21일
Hi Guys, I have 5 figures open and have used fill() to plot two areas on each figure. I now want to plot a single line on each on each figure. How would I go about doing this? would it be in the form
[ax,f1,f2] = fill(x1,y1,c1,x2,y2,c2]
then
gcf(ax,plot(xNew,yNew))
So my question is: is there some way of adding a plot to an figure which is already open without having to re plot the original data.
Thanks in advance.
Tim.

채택된 답변

Robert Cumming
Robert Cumming 2012년 9월 25일
You need to keep hold on the axes handle in each figure, then plot on them specifically:
plot ( axesHandle1, X, Y );
plot ( axesHandle2, X, Y );
plot ( axesHandle3, X, Y );
plot ( axesHandle4, X, Y );
plot ( axesHandle5, X, Y );
  댓글 수: 1
Tim Mottram
Tim Mottram 2012년 9월 25일
Thanks, Got it now. Used gca to return each axis handle then hold on to update. Thanks for your help.

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

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 9월 21일
  댓글 수: 1
Tim Mottram
Tim Mottram 2012년 9월 25일
Sorry, Maybe I didn't explain my self correctly. I have created 5 plots using fill at a point earlier in my program. These 5 figures are open. After some processing I now want to add a line to each individual plot. Kind of like :
Figure1.addLine
I know this doesn't exist but was looking for a method which might work.

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

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by