I have a data file with 3 columns and I'd like to plot a 2D map plot. What I do in gnuplot is:
p'datafile' u 1:2:3 with image
for some set of data, the data on the 3rd column (say Z) are different with order of 0.01, e.g 1.56, 1.58, 1.59 etc. I'd like to skip those small difference and consider them all 1.5. How can I set gnuplot to consider only up to one digit after decimal for 3rd column? Thanks!
You can use the
floor
function to round your numbers down:This sets all your numbers to 1 decimal place. If you wanted to do the same thing for a higher number of decimal places, you could change the
1e1
to1eN
, whereN
is the number of decimal places you want.