|
From: K.Moriyama <km...@mb...> - 2005-03-10 01:02:13
|
Hi,
you can do change of the colors for EPS output through
a filter like this. (on Unix)
you can change the line definition as you like so
you can have dashed and solid lines with same color, or whatever.
my example is,
1) have a script "gpepscolor" like this. (I used Perl)
--------8<----------------8<----------------8<--------
#!/usr/bin/perl
while (<>) {
if (/^\/LT1/) {
print "/LT1 { PL [4 dl 2 dl] 0.13 0.39 0.13 DL } def";
} elsif (/^\/LT4/) {
print "/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 0.8 0.8 DL } def";
} elsif (/^\/LT5/) {
print "/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 0.6 0.3 0.2 DL } def";
} else {
print;
}
}
--------8<----------------8<----------------8<--------
in this script i wanted to change the colors of a few lines which
were not easy to see on screen (presentation), such as green, cyan and
yellow.
lines in the EPS file defining line types (beginning with /LT#/)
are replaced by ones with my own line definition.
2) then, do this in gnuplot
set term postscript eps color
set output "| gpepscolor > out.eps" # writing a file through a filter
plot sin(x) lt 1, cos(x) lt 2
then the output is filtered by the script above and
the output file "out.eps" has altered colors of lines.
this filtering is available for any terminals that outputs text file.
i use the same way for tgif terminal, and also to get a "grayscale" EPS.
mori
|