If you just plot the data in log-log scale it looks nice but if i use
smooth cspline it looks ugly. you get wiggle at the point when the
scale jump. Please let me know if there is work around or solution to
it. I guess if i take log of data and than smooth it than i should get
a smooth curve but i want that to be last option.
Thanks,
Shailendra
You should avoid vague terms like " it looks nice " and try to be
clear and precise.
Can you please explain exactly what you think smooth csplines should
do and what is incorrect with the results you get. It looks correct to
me.
If you can explain what you expect a cspline to do, I can explain
where you are mistaken.
regards.
I believe this is a fundemental flaw in gnuplot.
csplines defines a curve that goes through all data points without
discontinous changes in direction.
As can be seen by plotting the data provided above, this can give
unexpected excursions outside the range of the data points.
What I guess the user was looking for was some smoothing that would
give less weight to the data lying away from the fairly clearly
defined straight line, not exagerate the excusions.
Sadly this does not currently exist.
I think some such smoothing should be provided or (if the reply is
that gnuplot is not for data processing) then csplines should be
removed.
regards.
You do realize that gnuplot has an entire subsystem, "fit",
that will fit any sort of smooth curve you want? Yes, you have
to first decide what is the mathematical form of this curve,
but isn't that exactly what you are asking for?
>
>I think some such smoothing should be provided or (if the reply is
>that gnuplot is not for data processing) then csplines should be
>removed.
>
>regards.
>
>
--
Ethan A Merritt
Thanks Ethan. Yes I do realise about fit command and the way I would
treat the above data would probably be to fit a straight line but that
is hypothetical without knowing what the data represents.
Fit is fine if there is a prototype function to fit , clearly that is
not always the case.
All that does not really address the basic issue I raised, that
fitting a spline through every point is often not what is required.
There are often data points we would prefer to play down rather than
force an excursion to include.
Fitting a spline to experimental data necessarily containing errors
just does not make sense, as plotting the above data shows.
Clearly what the user was expecting was some kind of mean to smooth
the data. This would not be any harder to compute than fitting a
cspline.
I don't understand the inclusion of splines and the exclusion of other
more standard smoothing techniques.
Thanks for your reply.
As has been mentioned elsewhere, one usually has an idea of how the
data should behave, and can therefore fit a curve to it. Failing that,
you can use approximate cubic splines; see `help acsplines`; these
usually do a good job of drawing a smoothed curve through noisy data.
Of course, it's just a visual aid, since you can't do any kind of
interpolation.
THeo
Method 2:
-------------
I take the data mentioned in my previous email and take LOG10(Y-axis-
data) and create new file with log10(y) as y-axis
set log x note: no y here
plot <file_name> using 2:1 smooth cspline
I do not get the same plot. Am i wrong in expecting the both method to
give the same plot?
Thanks,
Shailendra