image - workaround for missing pm3d corners2color feature in gnuplot -


as written in manual of gnuplot @ page 136,

because pm3d algorithm not extend colored surface outside range of input data points, 'c' coloring options result in pixels along 2 edges of grid not contributing color of quadrangle. example, applying pm3d algorithm 4x4 grid of data points in script demo/pm3d.dem (please have look) produces (4-1)x(4-1)=9 colored rectangles.

so if plot 4x4 pixel sized image, can't in way without missing 4th column , row. (i not modify file.) there efficent workaround problem?

to plot 4x4 image shows color rectangles specified in data file, splot ... pm3d not suited. 1 can use image plotting style. pm3d mode must used e.g when grid points not equidistant, or 3d representation.

taking following file data.dat

1 6 8 3 2 5 4 4 9 1 1 2 5 4 3 8 

a more or less minimal script be

set autoscale fix set xtics 1 out set ytics 1 out plot 'data.dat' matrix image t '' 

the result set terminal pngcairo is:

enter image description here

the terminal must support plotting with image, case most, not (e.g. pstricks not). in case 1 need use with image failsafe.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -