Subject: Draw an animated gif with black background
From: Rich Hennessy
Date: Sun, 18 Jan 2009 18:02:39 -0800 (PST)
Thanks again. I'll try it.
> Thanks, that worked but now I can't see any of the titles or labels. Is there a way to change the default foreground color to white
> or some hex code?
set_draw_defaults(
xrange = [-1,1],
yrange = [-1,1],
color = yellow,
user_preamble =
["set title 'My title' tc rgb 'white'",
"set label 'My 1st label' at 0, 0.5 tc rgb 'white'",
"set label 'My 2nd label' at 0, -0.5 tc rgb 'cyan'"],
line_width = 2 )$
draw(
delay = 100,
file_name = "zzz",
terminal = 'animated_gif,
file_bgcolor = "#000000",
gr2d(explicit(x^2,x,-1,1)),
gr2d(explicit(x^3,x,-1,1)),
gr2d(explicit(x^4,x,-1,1)));
-------------
I have dedicated some time in the past trying to declare font types,
sizes and colors, in a standard mode for all terminals, but couldn't
find any (not all terminals support the same types and sizes), so that
this is a chance for option user_preamble to be used instead.
There is also an extra problem with labels. According to documentation:
Colored labels work only with Gnuplot 4.3. This is a known bug in
package @code{draw}.
In fact, they don't work in Gnuplot 4.2.* when they are entered as data,
as is the case in package draw. But they do work when they are entered
with the 'set label' command as in the example above. As a consequence,
this is another chance for user_preamble.
hth.
Mario