manpagez: man pages & more
info gnuplot
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1.0.24 png

Syntax:

 
      set terminal png 
             {{no}transparent} {{no}interlace}
             {{no}truecolor} {rounded|butt}
             {linewidth <lw>} {dashlength <dl>}
             {tiny | small | medium | large | giant}
             {font "<face> {,<pointsize>}"} {{no}enhanced}
             {size <x>,<y>} {{no}crop}
             {<background_color>}

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

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

You can view the output from successive plot commands interactively by typing <space> 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‘.

‘interlace‘ instructs the driver to generate interlaced PNGs. Default is ‘nointerlace‘.

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.

By default output png images use 256 indexed colors. The ‘truecolor‘ option instead creates TrueColor images with 24 bits of color information per pixel. Transparent fill styles require the ‘truecolor‘ option. See ‘fillstyle‘. A transparent background is possible in either indexed or TrueColor images.

‘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 png font arial 11
     set term png font "arial,11"

For more information please see the separate section under ‘fonts‘.

The output plot size <x,y> is given in pixels—it defaults to 640x480. Please see additional information under ‘canvas‘ and size. 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.

— EXAMPLES —

 
      set terminal png medium size 640,480 xffffff

Use the medium size built-in non-scaleable, non-rotatable font. Use white (xffffff) for the non-transparent background.

 
      set terminal png font arial 14 size 800,600

Searches for a scalable font with face name ’arial’ and sets the font size to 14pt. Please see ‘fonts‘ for details of how the font search is done.

 
      set terminal png transparent truecolor enhanced

Use 24 bits of color information per pixel, with a transparent background. Use the ‘enhanced text‘ mode to control the layout of strings to be printed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.