Pregunta

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. basic result

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.

desired result

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
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top