I have a data file that I would like to plot as a heatmap. There are 3 columns: x, y, and the count at point (x,y). The problem is that the bins have different sizes in y (and not in x), for example
-0.3 0 0
-0.3 6.7082 0
-0.3 8.66025 0
-0.3 10.247 0
-0.3 11.619 0
-0.3 12.8452 0
...
But when I plot using for example
set view map
set size ratio -1
set key off
splot "histo.txt" u 1:2:3 w image
I get an image in which the bin sizes in the y direction are the same, thus the picture is distorted. How can I plot a heatmap with different bin sizes in one direction? I also know exactly where each bin should begin and end in y, the values in the second column of the data file are a weigthed average.
Thank you.
with image
plots a pixel image, with a regular pixel grid. Trypm3d
, and read the docs forpm3d interpolate
andpm3d corners2color
to understand how that works. – Christoph