Pngcairo

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

Syntax:

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

This terminal supports an enhanced text mode, which allows font and other formatting commands (subscripts, superscripts, etc.) to be embedded in labels and other text strings. The enhanced text mode syntax is shared with other gnuplot terminal types. See enhanced (p. [*]) for more details.

The width of all lines in the plot can be modified by the factor 4#4lw5#5.

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

The default size for the output is 640 x 480 pixels. The size option changes this to whatever the user requests. By default the X and Y sizes are taken to be in pixels, but other units are possible (currently cm and inch). A size given in centimeters or inches will be converted into pixels assuming a resolution of 72 dpi. Screen coordinates always run from 0.0 to 1.0 along the full length of the plot edges as specified by the size option.

4#4font5#5 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 pngcairo terminal will use 'Sans'. FontSize is the font size, in points. If you do not provide it, the pngcairo terminal will use a size of 12 points.

  For example :
     set term pngcairo font "Arial,12"
     set term pngcairo font "Arial" # to change the font face only
     set term pngcairo font ",12" # to change the font size only
     set term pngcairo 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 layout the text, is based on utf-8. Thus, the pngcairo terminal has to convert from your encoding to utf-8. The default input encoding is based on your 'locale'. If you want to use another encoding, make sure gnuplot knows which one you are using. See encoding (p. [*]) for more detail.

Pango may give unexpected results with fonts that do not respect the unicode mapping. With the Symbol font, for example, the pngcairo 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.

Rendering uses oversampling, antialiasing, and font hinting to the extent supported by the cairo and pango libraries.