I have several plots where data from file is plotted as points. Now I
wanted to interpolate some curves out of this data but "smooth bezier"
is not what I want, the curve is too far away from the points. The other
options of smooth aren't better here, too.
Now I read that I can interpolate the curve by fitting it to a known
function but first I do not always know the function and second it's
much work for many curves.
Isn't there a smooth-option that creates a curve which is still close to
the data points (e.g. like MS Excel does when I say "smooth curve" -
here all data points are still connected, not just first and last one)?
Jens
> I have several plots where data from file is plotted as points. Now I
> wanted to interpolate some curves out of this data but "smooth bezier"
> is not what I want, the curve is too far away from the points. The other
> options of smooth aren't better here, too.
That's somewhat surprising... IIRC the 'csplines' and 'acsplines'
types should go through all points by construction. Care giving a
concrete example for people to examine more closely?
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Yes, csplines goes through all points but the curve is going crazy that
way, when trying acsplines I get
"Can't calculate approximation splines, all weights have to be > 0".
My data is
10 2.041199827
15 5.440680444
25 8.129133566
50 10.79181246
75 11.46128036
100 11.76091259
1000 12.04119983
10000 12.04119983
11000 12.04119983
12000 12.04119983
15000 12.04119983
20000 11.76091259
30000 11.46128036
40000 10.96910013
100000 8.129133566
110000 7.781512504
and I just get this http://mechaniker.bei.t-online.de/plot.gif
(green=bezier, blue=csplines)
Maybe someone can give me another hint on this.
> Yes, csplines goes through all points but the curve is going crazy that
> way,
Well, there is a limit to what a spline can do. It's not as bad as it
would be with a single, high-degree interpolating polynomial, which
can go arbitrarily far away from the input points, but there still are
some limitations.
> when trying acsplines I get
> "Can't calculate approximation splines, all weights have to be > 0".
So what weights did you give it? Did you you read the help on
'acsplines' carefully?
One further notice: you're plotting a dataset covering 4 decades, on a
logarithmic axis. That's actually the root of your problem. If you
unset log x
plot 'those_data' u (log10($1)):2 sm cspl w l
you'll get a curve much closer to what your expectations seems to be.
OK, got the thing with acsplines but with weight=const=1 of course its
same like csplines.
What you here told me works indeed, I changed the axis-tics and now I
have what I want. Thanks for this.
Now I found a post from you out of 11/2002 where you told someone nearly
the same things for the y-axes. Sorry that I didn't found this earlier
or maybe I did but the topic didn't match ;)
Of course this was wrong but now I really got it :)