## Qt

The qt terminal device generates output in a separate window with the Qt library. Syntax:

           set term qt {<n>}
                       {size <width>,<height>}
                       {position <x>,<y>}
                       {title "title"}
                       {font <font>} {{no}enhanced}
                       {linewidth <lw>} {dashlength <dl>}
                       {{no}persist} {{no}raise} {{no}ctrl}
                       {close}
                       {widget <id>}

Multiple plot windows are supported: set terminal qt n directs the output to plot window number n.

The default window title is based on the window number. This title can also be specified with the keyword "title".

Plot windows remain open even when the gnuplot driver is changed to a different device. A plot window can be closed by pressing the letter 'q' while that window has input focus, by choosing close from a window manager menu, or with set term qt n close.

The size of the plot area is given in pixels, it defaults to 640x480. In addition to that, the actual size of the window also includes the space reserved for the toolbar and the status bar. When you resize a window, the plot is immediately scaled to fit in the new size of the window. The qt terminal scales the whole plot, including fonts and linewidths, and keeps its global aspect ratio constant. If you type replot, click the replot icon in the terminal toolbar or type a new plot command, the new plot will completely fit in the window and the font size and the linewidths will be reset to their defaults.

The position option can be used to set the position of the plot window. The position option only applies to the first plot after the set term command.

The active plot window (the one selected by set term qt n) is interactive. Its behaviour is shared with other terminal types. See mouse (p. ) for details. It also has some extra icons, which are supposed to be self-explanatory.

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.

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 qt terminal will use 'Sans'. FontSize is the font size, in points. If you do not provide it, the qt terminal will use a size of 9 points.

      For example :
         set term qt font "Arial,12"
         set term qt font "Arial" # to change the font face only
         set term qt font ",12" # to change the font size only
         set term qt font "" # to reset the font name and size

The dashlength affects only custom dash patterns, not Qt's built-in set.

To obtain the best output possible, the rendering involves three mechanisms : antialiasing, oversampling and hinting. 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). Hinting avoids the blur on horizontal and vertical lines caused by oversampling. The terminal will snap these lines to integer coordinates so that a one-pixel-wide line will actually be drawn on one and only one pixel.

By default, the window is raised to the top of your desktop when a plot is drawn. This can be controlled with the keyword "raise". The keyword "persist" will prevent gnuplot from exiting before you explicitly close all the plot windows.

The space key raises the gnuplot console window [MS Windows only]. The 'q' key closes the plot window. These hot keys can be changed to ctrl-space and ctrl-q using the terminal option keyword "{no}ctrl". However the preferred way to select ctrl-q rather than 'q' is to use the toggle in the tools widget of the plot window.

The gnuplot outboard driver, gnuplot_qt, is searched in a default place chosen when the program is compiled. You can override that by defining the environment variable GNUPLOT_DRIVER_DIR.