Hopefully, this is a stupid question, and easy to fix. When I run this simple gnuplot script:
#!/usr/bin/env gnuplot
set term png
set out "out.png"
plot "<jot -r -p 2 500 1 2" not w p pt 7 ps 4 lc rgb "#908DB6CD"
set term post eps enhanced color
set out "out.eps"
replot
exit
The png file looks like this:
And the eps looks like this:
The pdfcairo
terminal also gives me transparency. Any clues on how to make the eps files show transparency?
Many thanks in advance!
I think I should respond to my own question, so at least this becomes a case closed.
After some more digging, and from the comments I received, the bottom line is that the gnuplot postscript
terminal does not handle transparency, while the pdf
and pdfcairo
terminals do.
The trick is to generate an .eps file from a .pdf using pdftops
:
#!/bin/bash
gnuplot << GNU
set term pdf
set out "out.pdf"
plot "<jot -r -p 2 500 1 2" not w p pt 7 ps 4 lc rgb "#908DB6CD"
GNU
pdftops -eps out.pdf
All of my .eps files are generated to be incorporated to LaTeX documents. Then, I could just switch to PDFLaTeX and be over with it. However, at times I like to edit the .eps to tweak the bounding box and other things by hand or using awk/sed. Anyway, hope this is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With