next up previous contents index
Next: Examples Up: Complete list of terminals Previous: Ggi   Contents   Index


Gif

Syntax:
     set terminal gif 
            {{no}transparent} {rounded|butt}
            {linewidth <lw>} {dashlength <dl>}
            {tiny | small | medium | large | giant}
            {font "<face> {,<pointsize>}"} {{no}enhanced}
            {size <x>,<y>} {{no}crop}
            {animate {delay <d>} {loop <n>} {{no}optimize}}
            {<background_color>}

PNG, JPEG and GIF images are created using the external library libgd. GIF plots may be viewed interactively by piping the output to the 'display' program from the ImageMagick package as follows:

              set term gif
              set output '| display gif:-'

You can view the output from successive plot commands interactively by typing 4#4space5#5 in the display window. To save the current plot to a file, left click in the display window and choose save.

transparent instructs the driver to make the background color transparent. Default is notransparent.

The linewidth and dashlength options are scaling factors that affect all lines drawn, i.e. they are multiplied by values requested in various drawing commands.

butt instructs the driver to use a line drawing method that does not overshoot the desired end point of a line. This setting is only applicable for line widths greater than 1. This setting is most useful when drawing horizontal or vertical lines. Default is rounded.

The details of font selection are complicated. Two equivalent simple examples are given below:

    set term gif font arial 11
    set term gif font "arial,11"

For more information please see the separate section under fonts (p. [*]).

The animate option is available only if your local gd library supports the creation of animated gifs. The default delay between display of successive images may be specified in units of 1/100 second (default 5). The actual delay may vary depending on the program used as a viewer. Number of animation loops can be specified, default 0 means infinity. An animation sequence is terminated by the next set output or set term command. The optimize option has two effects on the animation.

1) A single color map is used for the entire animation. This requires that all colors used in any frame of the animation are already defined in the first frame.

2) If possible, only the portions of a frame that differ from the previous frame are stored in the animation file. This space saving may not be possible if the animation uses transparency.

Both of these optimizations are intended to produce a smaller output file, but the decrease in size is probably only significant for long animations or very small frame sizes. The nooptimize option turns off both of the effects just described. Each frame is stored in its entirety along with a private color map. Note that it is possible to post-process a non-optimized animation using external utilities, and this post-processing can yield a smaller file than gnuplot's internal optimization mode. The default is nooptimize.

The output plot size 4#4x,y5#5 is given in pixels -- it defaults to 640x480. Please see additional information under canvas (p. [*]) and set size (p. [*]). Blank space at the edges of the finished plot may be trimmed using the crop option, resulting in a smaller final image size. Default is nocrop.

The background color must be given in the form 'xrrggbb', where x is the literal character 'x' and 'rrggbb' are the red, green and blue components in hexadecimal. For example, 'x00ff00' is green. The specification of additional colors other than the background is deprecated.



Subsections
next up previous contents index
Next: Examples Up: Complete list of terminals Previous: Ggi   Contents   Index
2012-11-28