Credits Overview Plotting Styles Commands Terminals

jpeg

Syntax:

      set terminal jpeg 
             {{no}enhanced}
             {{no}interlace}
             {linewidth <lw>} {dashlength <dl>} {rounded|butt}
             {tiny | small | medium | large | giant}
             {font "<face> {,<pointsize>}"} {fontscale <scale>}
             {size <x>,<y>} {{no}crop}
             {background <rgb_color>}

PNG, JPEG and GIF images are created using the external library libgd. In most cases, PNG is to be preferred for single plots, and GIF for animations. Both are loss-less image formats, and produce better image quality than the lossy JPEG format. This is in particular noticeable for solid color lines against a solid background, i.e. exactly the sort of image typically created by gnuplot.

The interlace option creates a progressive JPEG image. 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.

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 jpeg font arial 11
     set term jpeg 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 set 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.