gnuplot cuts off fractional digits
gnuplot
Solution
Unfortunately you did not show any data from you file, but I guess you are using commas as decimal separators. In that case you need to set the right decimal sign for reading the input. You can use e.g.
set decimalsign locale
or use an explicit locale (this must be installed)
set decimalsign locale "de_DE.UTF-8"
Note, that setting an explicit character with `set decimalsign ','` does not work because it usually affects only the output format of e.g. tics, but not the input behaviour.
Problem
I want to plot some stockpile data. The data is located in a csv-file and I already got an almost accurate plot, so reading from file isn't the problem. ``` set terminal pdf set output "gnuplot/".MATNUM."-2012.pdf" set datafile separator ";" stats 'Stock-2012.csv' every ::4::18 using MATNUM nooutput set border 3 set tics nomirror set xzeroaxis set xrange[0:14] set xtics 1,1,13 set xtics rotate 90 set ylabel MATUNIT maxplot = sprintf("Amount max:\n%.2f ".MATUNIT, STATS_max) plot 'Stock-2012.csv' every ::4::18 using ($0+1):MATNUM:xticlabels(2) with linespoints title "Amount", STATS_max with lines lc rgb 'blue' title maxplot ``` Where MATNUM and MATUNIT are commandline arguments, representing materialnumber (which is the columntitle in the datafile) and the unit in which the material is measured. The x-values in my datafile are decimals, but gnuplot seems to cut off the fractional digits. For example 12,98 (commata are used as decimal separator, because it's a german stockpile) results in a datapoint at y=12. I'm not sure but I think this happens only at the maximum and minimum y-value, as STATS_max is an integer every time. What can I do to get my points at the right y-value?