Credits Overview Plotting Styles Commands Terminals

pdfcairo

The pdfcairo terminal device generates output in pdf. The actual drawing is done via cairo, a 2D graphics library, and pango, a library for laying out and rendering text.

Syntax:

        set term pdfcairo
                     {{no}enhanced} {mono|color}
                     {font <font>} {fontscale <scale>}
                     {linewidth <lw>} {rounded|butt|square} {dashlength <dl>}
                     {background <rgbcolor>}
                     {size <XX>{unit},<YY>{unit}}

This terminal processes labels and other text using enhanced formatting by default. See enhanced.

The width of all lines in the plot can be modified by the factor <lw> specified in linewidth. The default linewidth is 0.5 points. (1 "PostScript" point = 1/72 inch = 0.353 mm)

rounded sets line caps and line joins to be rounded; butt is the default, butt caps and mitered joins.

The default size for output is 5 inches x 3 inches. The size option changes this to whatever the user requests. By default the X and Y sizes are taken to be in inches, but other units are possible (currently only cm). font is in the format "FontFace,FontSize", i.e. the face and the size comma-separated in a single string. FontFace is a usual font face name, such as 'Arial'. If you do not provide FontFace, the pdfcairo terminal will use 'Sans'. FontSize is the font size, in points. If you do not provide it, the pdfcairo terminal will use a nominal font size of 12 points. However, the default fontscale parameter for this terminal is 0.5, so the apparent font size is smaller than the nominal point size if the pdf output is viewed at full size.

   Examples :
      set term pdfcairo font "Arial,12"
      set term pdfcairo font "Serif" # to change the font face only
      set term pdfcairo font ",14" # to change the font size only
      set term pdfcairo font "" # to reset the font name and size

The fonts are retrieved from the usual fonts subsystems. Under Windows, those fonts are to be found and configured in the entry "Fonts" of the control panel. Under UNIX, they are handled by "fontconfig".

Pango, the library used to process the text, is based on utf-8. The pdfcairo terminal will convert from your encoding to utf-8 if needed. The assumed input encoding is taken from your 'locale'. If your text actually uses a different encoding, make sure gnuplot knows which one you are using. See encoding for more details.

Pango may give unexpected results with fonts that do not respect the unicode mapping. With the Symbol font, for example, the pdfcairo terminal will use the map provided by http://www.unicode.org/ to translate character codes to unicode. Note that "the Symbol font" is to be understood as the Adobe Symbol font, distributed with Acrobat Reader as "SY______.PFB". Alternatively, the OpenSymbol font, distributed with OpenOffice.org as "opens___.ttf", offers the same characters. Microsoft has distributed a Symbol font ("symbol.ttf"), but it has a different character set with several missing or moved mathematic characters. If you experience problems with your default setup (if the demo enhancedtext.dem is not displayed properly for example), you probably have to install one of the Adobe or OpenOffice Symbol fonts, and remove the Microsoft one. Other non-conform fonts, such as "wingdings" have been observed working.

The rendering of the plot involves two mechanisms : antialiasing and oversampling. Antialiasing produces smoother non-horizontal and non-vertical lines. Oversampling combined with antialiasing provides subpixel accuracy, so that gnuplot can draw a line from non-integer coordinates. This avoids wobbling effects on diagonal lines ('plot x' for example).