show just one curve

Hi. Im using GUIDE to create axes component that I then plot raw data to. I want to also see a smoothing function superimposed. I use csaps(x,y,p) where p is the smoothing parameter.
Here is my code that plots several smoothing curves at once
axes(handles.axes1);
fnplt(csaps(x1,y1,1),1,'k--')
fnplt(csaps(x1,y1,0.8),1,'r:')
fnplt(csaps(x1,y1,0.6),1,'m:')
How can I plot the smoothing curves just one at a time with only one showing.

2 Comments

Jan
Jan on 12 May 2011
Perhaps I do not understand the question: If you want to see one line only, comment out the two other fnplot line?!
Jason
Jason on 12 May 2011
I want the ability to try different amount sof smoothing and then use this one. As my data is always different, I wont know before I try

Sign in to comment.

Answers (1)

Sean de Wolski
Sean de Wolski on 12 May 2011
Use
cla
to clear the old stuff and replot only what you want.

3 Comments

Jason
Jason on 12 May 2011
But this will also remove my original x,y data. Can I somehow use tags to plot the fnplts and then delete a particular tag?
You couldn't just replot x/y?
Jason
Jason on 12 May 2011
Yes this seems the way I will have to do it, but its not very elegant.

Sign in to comment.

Categories

Asked:

on 12 May 2011

Community Treasure Hunt

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

Start Hunting!