next up previous contents index
Next: Kyo Up: Terminal Previous: Iris4d   Contents   Index



     set terminal jpeg 
                      {tiny | small | medium | large | giant}
                      {font <face> {<pointsize>}}
                      {size <x>,<y>} {{no}crop}
                      {<color0> <color1> <color2> ...}

JPEG images are created using libgd, with optional support for TrueType fonts via libfreetype.

The interlace option creates a progressive JPEG image. Default is nointerlace.

Five basic fonts are supported directly by the gd library. These are tiny (5x8 pixels), small (6x12 pixels), medium, (7x13 Bold), large (8x16) or giant (9x15 pixels). These fonts cannot be scaled or rotated (pure horizontal or vertical text only).

If gnuplot was built with support for TrueType (*.ttf) or Adobe Type 1 (*.pfa) fonts, they may be selected using the 'font 5#5face6#6 {5#5pointsize6#6}' option. 5#5face6#6 is either the full pathname to the font file, or a font face name that is assumed to be the first part of a filename in one of the directories listed in the GDFONTPATH environmental variable. That is, 'set term jpeg font "Face"' will look for a font file named either 5#5somedirectory6#6/Face.ttf or 5#5somedirectory6#6/Face.pfa. Both TrueType and Adobe Type 1 fonts are fully scalable and may be rotated through any angle. If no font is specified, gnuplot checks the environmental variable GNUPLOT_DEFAULT_GDFONT to see if there is a preferred default font.

enhanced enables the enhanced text processing features, (subscripts, superscripts and mixed fonts). See enhanced (p. [*]) for more information. The full enhanced mode syntax is supported by the PNG/JPEG driver itself, but some of these features are dependent on which version of the underlying libgd library is present, and which fonts are available.

The size 5#5x,y6#6 is given in pixels -- it defaults to 640x480. The number of pixels can be also modified by scaling with the set size command. crop trims blank space from the edges of the completed plot, resulting in a smaller final image size. Default is nocrop.

Each color must be of the form 'xrrggbb', where x is the literal character 'x' and 'rrggbb' are the red, green and blue components in hex. For example, 'x00ff00' is green. The background color is set first, then the border colors, then the X & Y axis colors, then the plotting colors. The maximum number of colors that can be set is 256.


     set terminal jpeg medium size 640,480 \
                      xffffff x000000 x404040 \
                      xff0000 xffa500 x66cdaa xcdb5cd \
                      xadd8e6 x0000ff xdda0dd x9500d3    # defaults

which uses white for the non-transparent background, black for borders, gray for the axes, and red, orange, medium aquamarine, thistle 3, light blue, blue, plum and dark violet for eight plotting colors.

     set terminal jpeg large font arial size 800,600

which searches for a TrueType font with face name 'arial' in the directory specified by the environment variable GDFONTPATH and large (14pt) font size.

next up previous contents index
Next: Kyo Up: Terminal Previous: Iris4d   Contents   Index
Ethan Merritt 2007-03-03