
I’m having difficulty getting GNUplot to properly render some of my data. Basically I have some 2D heightmap data (for example 512 x 128 data points) and would like to be able to plot this in a “pixel perfect” fashion (i.e. one pixel per data point). Unfortunately at the moment, I’m getting artefacts (see inset) due to the number of pixels being slightly larger than the number of data points. I know I can set the total size of the output using:
set terminal png size 800,400
but is there a way to set just the plot area size in pixels?
Thanks!
From the help of the lua/TikZ terminal (there is an option plotsize) it is suggested to remove the plot margins so that plot fills the whole canvas.
However, this has the drawbacks that you will not have tic labels and so on. You can of course calculate values for the margins yourself, so that they match with the plot size in the end: use
for example.
Anyway, I would also recommend going for vector graphics whenever possible.