For this you can use the command set autoscale <axes>fix
:
set term pngcairo size 800,600
set out "test.png"
set pm3d map
set autoscale fix
splot "fill.dat"
Which gives you exactly the second image you posted.
题
I have a datafile that I would like to create a pm3d map
splot of. Code:
set term pngcairo size 800,600
set out "test.png"
set pm3d map
splot "fill.dat"
Problem is, with the odd (but regular) spacings using in the data, gnuplot
creates a huge white margin around the actual image.
I want to look it like the following, but without setting the x- and yrange manually. I think I remember there being an option in gnuplot
to achieve a 'tight' fitting of the axes, but I don't recall the actual command.
Content of file fill.dat
1.1 1.2 3
1.1 2.4 4
1.1 3.6 2
2.2 1.2 5
2.2 2.4 1
2.2 3.6 2
3.3 1.2 7
3.3 2.4 2
3.3 3.6 5
解决方案
For this you can use the command set autoscale <axes>fix
:
set term pngcairo size 800,600
set out "test.png"
set pm3d map
set autoscale fix
splot "fill.dat"
Which gives you exactly the second image you posted.