Subject: Draw an animated gif with black background
From: Mario Rodriguez
Date: Wed, 31 Dec 2008 10:39:00 +0100
El mar, 30-12-2008 a las 18:34 -0500, Richard Hennessy escribi?:
> Is there a way to change the background color of an "animated gif" output file from draw()? I would like for my website to have
> white moving curves on a black or dark colored background. Can this be done? I currently have black or blue on white which I don't
> like.
>
> Rich
>
Commited draw with new file_bgcolor option.
Option file_bgcolor must be given a color in hex format; 'file_bgcolor =
black' is not allowed at this moment.
This option affects terminals gif, animated_gif, jpg and png. (I
couldn'n test jpg, since my current installation of gnuplot sends a
segmentation fault error message with this format).
Sample code:
set_draw_defaults(
color = yellow,
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)));
Hope you'll find this useful.
Mario