8
votes

I have a simple script:

set term postscript portrait color
set output 'output.ps'
plot 'data_file' using 1:2:3 with image, 'data_file2' using 1:2 with lines

The problem is that the with image command makes the tics disappear in both axis and I can't make gnuplot show them unless I remove that command, which I can't since I'm plotting a cbrange (the third column is the range)

Thanks.

2
Do you have a (very simple) datafile we could play around with? I don't have much experience with with image and I'd like to play around with it a bit to learn.mgilson
I worked around it using splot and set pm3d map. Thanks anyway!Gabriel
I'm glad you figured out a workable solution. I always use set view map with the pm3d style too.mgilson
@Gaba_p: if you figured it out, why not post the solution as an answer to your own question?Dan
I can't add the answer until 8 hours have passed because I'm a new user. I'll add it in an hour. Cheers.Gabriel

2 Answers

9
votes

pm3d is not the same as "plot ... with image", so the workaround is maybe not the best solution. It seems, that gnuplot sets the tics automatically to the background, when you use the "with image" option, so

set tics front

should solve the problem (At least it did in my case).

0
votes

I worked around this issue by setting set pm3d map and using splot instead of plot. The second plot (which is a 2D plot) needs a dummy Z value so I repeated a column.

Finally, the working code looks like this:

set term postscript portrait color
set output 'output.ps'
set pm3d map
splot 'data_file' using 1:2:3 with image, 'data_file2' using 1:2:2 with lines