Reputation: 127
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.
Upvotes: 1
Views: 5263
Reputation: 1799
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 andset cntrparam
andset dgrid3d
re 3D data.
Upvotes: 4