0

I have script:

set term eps size 1200,150
set output "file.eps"
#set term pngcairo size 1200,150
#set output "file.png"
set tics out
set xlabel "{/:Italic G}" 
set ylabel " " 
set ytics nomirror 
set xtics nomirror 
unset ytics
unset key 
#set key tc variable
set label "{/:Bold=12 A}" tc rgb "black" at 54250,5.05 
set label "{/:Bold=12 D}" tc rgb "black" at 56170,5.05
set label "{/:Bold=12 E}" tc rgb "black" at 56730,5.05
set arrow from 56000,graph(0,0) to 56000,graph(1,1) nohead dt "-" lw 1 lc rgb "grey30"
set arrow from 56500,graph(0,0) to 56500,graph(1,1) nohead dt "-" lw 1 lc rgb "grey30"
plot 'data.txt' title "{/:Bold data}" with points pt 7 ps 1 linecolor rgb "black"

that create good image in term pngcairo, but when I want .eps, the image is not possible to open. It is loading all the time. The size of the file is 61 Mb. I compile the script using gnuplot file.gnu

EDIT - after advice

The picture .eps enter image description here

The picture .png - desired output enter image description here

1 Answer 1

1

It seems that the error depends on the specific terminal type. Let's consult the documentation, from within gnuplot this works with help term eps:

The output is:

Ambiguous request 'term eps'; possible matches:

term epscairo
term epslatex

So eps is only an abbreviation for one of epscairo or epslatex. We call manually from within gnuplot set term eps and get the output

Terminal type set to 'epscairo'

OK, we are on epscairo. Next step is of course help term epscairo, and we see:

Please read the help for the `pdfcairo` terminal.

We are very close :) and type help term pdfcairo. Here we find some important information:

... The size option changes this to whatever the user requests. By default the X and Y sizes are taken to be in inches, but other units are possible (currently only cm). ...

This means the size 1200, 150 does not create an image of size 1200x150 pixels as with the pngcairo terminal, it creates an eps file with size 1200x150 inches which might be too large for the eps viewer. Default is size 5,3.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you very much, I can open a picture, however, the output is deffrent from the output from pngcairo.
*different; I added pictures to my question
We are getting closer, right? What values do you use for the size command? In your picture of the .eps file I see small dark spots at the positions where the .png has the letters A, B, C and the axis labels. Can you zoom in and check that the dark spots actually are the expected labels? In this case it should help to further reduce the size values. Play with them, make them smaller by a factor of 2, 5, 10, 20 ...

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.