|
From: Ethan M. <merritt@u.washington.edu> - 2004-11-29 04:25:47
|
On Sunday 28 November 2004 08:02 pm, Daniel Sebald wrote:
> I've been wondering about plot background colors, too. I often see
> plots with slightly off-white backgrounds. There is the X11 background
> color, but nothing for controlling background color for, say, png
You have not been looking very hard. Here is part of the output
from 'help set term png'
set term png ... {<color0> <color1> <color2> ...}
...
The background color is set first, then the border colors, then
the X & Y axis colors, then the plotting colors.
> or PostScript.
The PostScript output has no background color. It is intended to print on
whatever piece of paper you like, including a colored piece of paper.
Same thing if you import it into an electronic document - it gets the
background of whatever style sheet you import it into.
If you really need a solid background in a stand-along PostScript file
for some reason, it's a 1 or 2 line edit:
1) Find the line at the top of the file that says something like
%%BoundingBox: 50 50 554 770
2) Find the line that says
%%EndProlog
3) Just before the EndProlog line, add a command to fill the bounding box
with a color of your choice:
1 .4 1 setrgbcolor newpath
50 50 moveto 50 770 lineto 554 770 lineto 554 50 lineto closepath fill
Now your plot has a nice purple background.
> Just a thought.
I don't think it makes much sense, except maybe for bitmap output modes
that do not support transparency. For all other output formats, the
background is controlled by the document/webpage/paper/etc that the
plot is imported into.
|