1
votes

I run gnuplot 5.0 on Windows 7. I have a datafile with columns with 1000 lines. I want to gnuplot the 2nd column vs. the first and smooth the curve:

plot "data.dat" u 1 : 2 t "total bez" smooth bezier

The result looks overall reasonable, BUT: The problem is that this produces 3 straight line segments at small values of the x-axis; the higher values are smoothed out allright.

I experimented with this problem: by cutting the file to have less lines in it the plot becomes smooth also at lower x. Is there a limitation on the number of points that gnuplot smooth bezier can handle? U.

1
This is a good question for the gnuplot e-mail list if no one can answer it here.andyras
Its hard to tell if this a bug, without having some test data and the output fileChristoph

1 Answers

4
votes

Try to set samples to higher value, for example

set samples 10000 
plot "data.dat" u 1 : 2 t "total bez" smooth bezier

From gnuplot help:

By default, sampling is set to 100 points. A higher sampling rate will produce more accurate plots, but will take longer. This parameter has no effect on data file plotting unless one of the interpolation/approximation options is used. See plot smooth re 2D data and set cntrparam and set dgrid3d re 3D data.