Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
525 views
in Technique[技术] by (71.8m points)

image - Confusion with Gnuplot postscript terminal (CORRECTION : This is an issue with Mac Preview)

I am confused about the how to get the postscript terminal to replicate a similar figure to the png terminal.

Here is my script:

#!/usr/bin/env gnuplot

#set terminal png 
#set output 'test.png'
set terminal postscript eps enhanced
set output 'test.eps'

set palette defined (0 1.0 1.0 1.0, 1e-19 0.0 0.0 1.0, 1 1.0 0.0 0.0)
set cbrange [0:9]
plot 'test.dat' u 1:2:($3 > 0 ? $3 : 0) with image

Here is my data file:

1.0  1.0  4.0
1.0  2.0  7.0
1.0  3.0  9.0
2.0  1.0  6.0
2.0  2.0  8.0
2.0  3.0  2.0
3.0  1.0  8.0
3.0  2.0  1.0
3.0  3.0  0.0

When I plot the data using the png terminal the edges between the cells are crisp. When I use the postscript terminal, the edges of the cells use a color gradient to transition between the colors of the cells.

Question: Is there a way to make the eps terminal so that it does not have a gradient of colors at the edges of the cells and replicates the crisp edges of the png image?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It turns out that Mac's Preview is having difficulty with dealing with the eps image. When viewed in TexShop generated pdf with Adobe Acrobat it is correct. Thank you Christoph.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...