1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
clear
!
x = [0;1;2;3;5;6;4;3;5;10]
y = 2*x^2-3*x+50 + 100*ran(x)
!
window 0
defaults
set
plotsymbol -10
plotsymbolcolor red
graph x y
set
plotsymbol 0
tension 0
curvecolor blue
m = splsmooth(x,y,100)
graph\overlay m[*,1] m[*,2]
set
textinteractive 0
textalign 1
%xtextlocation 15
%ytextlocation 80
%textheight 6
textcolor blue
text 'tension = 0'
set
tension 0.01
curvecolor lime
m = splsmooth(x,y,100)
graph\overlay m[*,1] m[*,2]
set
%ytextlocation 70
textcolor lime
text 'tension = 0.01'
replot
|