1

Using gnuplot 5.0 patchlevel 5, I am trying to create an eps file containing a contour plot. However, the contour lines are accompanied by a grid and do not have the requested color. The output using the png terminal is just fine.

Here is the minimum code I use to generate the eps image:

set terminal epscairo
set output "test.eps"
set pm3d map impl
set style increment user
set contour
do for [i=1:5] { set style line i lc rgb "black" lw 3}
splot "data.dat" w pm3d notitle

eps image created by gnuplot with the funny feature around the contour

replacing the epscairo terminal by png gives the desired output:

png image created by gnuplot, this how I would like the eps image to look like

The data file I am using can be found here: data.dat

2
  • See stackoverflow.com/a/18954245/2604213 for a detailed explanation of this problem Commented Sep 19, 2018 at 20:38
  • I don't think that I have this type of problem. What I see in the eps figure is just an additional grid and change of color of the contour lines, no moiré. Commented Sep 20, 2018 at 9:44

1 Answer 1

1

I'd recommend using the epslatex or postscript terminals so you can encode the heat map as a binary in png (see the level3 option for both terminals).

Try replacing your first line with the following:

set term postscript color eps level3
Sign up to request clarification or add additional context in comments.

2 Comments

That option affects only plotting with image, but not pm3d.
Thank you, that fixed the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.