Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The easiest (maybe only viable) way is to add some dummy data points and use <code>splot ... with pm3d</code>. This plotting style handles heatmaps with general quadrangles. </p> <p>The <code>image</code> plotting style plots one box (one big pixel) for each data point, while <code>pm3d</code> takes each data point as corner of one or more quadrangles. The color of each quadrangles is determined by the values of the corners and is adjustable with <code>set pm3d corners2color</code>.</p> <p>So, in your case you need to expand the <code>4x4</code> matrix to a <code>5x5</code> matrix (expand to right and top), but select the lower left corner to determine the color <code>set pm3d corners2color c1</code>.</p> <p>The changed data file is then:</p> <pre><code>1 1 0.2 1 2 0.8 1 3 0.1 1 4 0.2 1 5 0.5 2 1 0.7 2 2 0.2 2 3 0.3 2 4 0.1 2 5 0.5 5 1 0.2 5 2 0.4 5 3 0.1 5 4 0.9 5 5 0.5 7 1 0.3 7 2 0.2 7 3 0.9 7 4 0.6 7 5 0.5 10 1 0.5 10 2 0.5 10 3 0.5 10 4 0.5 10 5 0.5 </code></pre> <p>To plot it use</p> <pre><code>set pm3d map corners2color c1 set autoscale fix set ytics 1 splot 'mydata.dat' using 1:($2-0.5):3 notitle </code></pre> <p>The result with 4.6.3 is:</p> <p><img src="https://i.stack.imgur.com/Cc1ku.png" alt="enter image description here"></p> <p>In general, the <code>z</code>-value of the dummy data points doesn't matter, but in the above script it should lay somewhere between minimum and maximum values to allow <code>set autoscale fix</code> to work properly on the color scale.</p> <p>If you don't want to change the data file manually, you could do it with some script, but that's a different question.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload