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:
the terminal must support plotting with image
, case most, not (e.g. pstricks
not). in case 1 need use with image failsafe
.
Comments
Post a Comment