
- •Copyright
- •Introduction
- •Seeking-assistance
- •New features
- •New syntax
- •Local customization of linetypes
- •New plot styles
- •Revised polar axes
- •New smoothing algorithms
- •New time/date handling
- •Statistical summary of data
- •New or revised terminal drivers
- •Backwards compatibility
- •Batch/Interactive Operation
- •Canvas size
- •Command-line-editing
- •Comments
- •Coordinates
- •Datastrings
- •Enhanced text mode
- •Environment
- •Expressions
- •Functions
- •Elliptic integrals
- •Random number generator
- •Value
- •Operators
- •Unary
- •Binary
- •Ternary
- •Summation
- •Fonts
- •Cairo (pdfcairo, pngcairo, epscairo, wxt terminals)
- •Gd (png, gif, jpeg terminals)
- •Postscript (also encapsulated postscript *.eps)
- •Glossary
- •Linetypes, colors, and styles
- •Colorspec
- •Linecolor variable
- •Rgbcolor variable
- •Linestyles vs linetypes
- •Mouse input
- •Bind
- •Bind space
- •Mouse variables
- •Plotting
- •Start-up (initialization)
- •String constants and string variables
- •Substitution and Command line macros
- •Substitution of system commands in backquotes
- •Substitution of string variables as macros
- •String variables, macros, and command line substitution
- •Syntax
- •Quote Marks
- •Time/Date data
- •Boxerrorbars
- •Boxes
- •Boxplot
- •Boxxyerrorbars
- •Candlesticks
- •Circles
- •Ellipses
- •Dots
- •Filledcurves
- •Financebars
- •Fsteps
- •Fillsteps
- •Histeps
- •Histograms
- •Newhistogram
- •Automated iteration over multiple columns
- •Image
- •Transparency
- •Image failsafe
- •Impulses
- •Labels
- •Lines
- •Linespoints
- •Points
- •Polar
- •Steps
- •Rgbalpha
- •Rgbimage
- •Vectors
- •Xerrorbars
- •Xyerrorbars
- •Yerrorbars
- •Xerrorlines
- •Xyerrorlines
- •Yerrorlines
- •3D (surface) plots
- •2D projection (set view map)
- •Call
- •Clear
- •Evaluate
- •Exit
- •Adjustable parameters
- •Short introduction
- •Error estimates
- •Statistical overview
- •Practical guidelines
- •Control
- •Control variables
- •Environment variables
- •Multi-branch
- •Starting values
- •Tips
- •Help
- •History
- •Iteration
- •Load
- •Lower
- •Pause
- •Plot
- •Axes
- •Binary
- •General
- •Array
- •Record
- •Skip
- •Format
- •Endian
- •Filetype
- •Keywords
- •Data
- •Every
- •Index
- •Smooth
- •Thru
- •Using
- •Volatile
- •Errorbars
- •Errorlines
- •Functions
- •Parametric
- •Ranges
- •Iteration
- •Title
- •With
- •Quit
- •Raise
- •Refresh
- •Replot
- •Reread
- •Reset
- •Save
- •Set-show
- •Angles
- •Arrow
- •Autoscale
- •Parametric mode
- •Polar mode
- •Bars
- •Bind
- •Bmargin
- •Border
- •Boxwidth
- •Clabel
- •Clip
- •Cntrparam
- •Color box
- •Colornames
- •Contour
- •Data style
- •Decimalsign
- •Dgrid3d
- •Dummy
- •Encoding
- •Fontpath
- •Format
- •Gprintf
- •Function style
- •Functions
- •Grid
- •Hidden3d
- •Historysize
- •Isosamples
- •Key placement
- •Key samples
- •Label
- •Linetype
- •Lmargin
- •Loadpath
- •Locale
- •Logscale
- •Macros
- •Mapping
- •Margin
- •Mouse
- •Doubleclick
- •Mouseformat
- •Scrolling
- •X11 mouse
- •Zoom
- •Multiplot
- •Mx2tics
- •Mxtics
- •My2tics
- •Mytics
- •Mztics
- •Object
- •Rectangle
- •Ellipse
- •Circle
- •Polygon
- •Origin
- •Output
- •Parametric
- •Plot
- •Algorithm
- •Position
- •Scanorder
- •Clipping
- •Hidden3d
- •Interpolate
- •Palette
- •Rgbformulae
- •Functions
- •Cubehelix
- •File
- •Gamma correction
- •Postscript
- •Pointintervalbox
- •Pointsize
- •Polar
- •Psdir
- •Raxis
- •Rmargin
- •Rrange
- •Rtics
- •Samples
- •Size
- •Style
- •Set style arrow
- •Boxplot
- •Set style data
- •Set style function
- •Set style increment
- •Set style line
- •Set style circle
- •Set style rectangle
- •Set style ellipse
- •Surface
- •Table
- •Terminal
- •Termoption
- •Tics
- •Ticslevel
- •Ticscale
- •Timestamp
- •Timefmt
- •Title
- •Tmargin
- •Trange
- •Urange
- •Variables
- •Version
- •View
- •Vrange
- •X2data
- •X2dtics
- •X2label
- •X2mtics
- •X2range
- •X2tics
- •X2zeroaxis
- •Xdata
- •Xdtics
- •Xlabel
- •Xmtics
- •Xrange
- •Xtics
- •Xtics rangelimited
- •Xyplane
- •Xzeroaxis
- •Y2data
- •Y2dtics
- •Y2label
- •Y2mtics
- •Y2range
- •Y2tics
- •Y2zeroaxis
- •Ydata
- •Ydtics
- •Ylabel
- •Ymtics
- •Yrange
- •Ytics
- •Yzeroaxis
- •Zdata
- •Zdtics
- •Zzeroaxis
- •Cbdata
- •Cbdtics
- •Zero
- •Zeroaxis
- •Zlabel
- •Zmtics
- •Zrange
- •Ztics
- •Cblabel
- •Cbmtics
- •Cbrange
- •Cbtics
- •Shell
- •Splot
- •Matrix
- •Grid data
- •Splot surfaces
- •Stats (Statistical Summary)
- •System
- •Test
- •Unset
- •Update
- •While
- •Complete list of terminals
- •Aifm
- •Aqua
- •Cairolatex
- •Canvas
- •Cgm font
- •Cgm fontsize
- •Cgm linewidth
- •Cgm rotate
- •Cgm solid
- •Cgm size
- •Cgm width
- •Cgm nofontlist
- •Context
- •Requirements
- •Calling gnuplot from ConTeXt
- •Corel
- •Debug
- •Dumb
- •Eepic
- •Emxvga
- •Epscairo
- •Epslatex
- •Excl
- •Examples
- •Gpic
- •Grass
- •Hpgl
- •Hpljii
- •Hppj
- •Imagen
- •Jpeg
- •Latex
- •Linux
- •Lua tikz
- •Macintosh
- •METAFONT Instructions
- •Metapost Instructions
- •Next
- •Openstep (next)
- •Pdfcairo
- •Examples
- •Pngcairo
- •Postscript
- •Editing postscript
- •Postscript prologue
- •Postscript adobeglyphnames
- •Pslatex and pstex
- •Pstricks
- •Regis
- •Svga
- •Texdraw
- •Tgif
- •Tikz
- •Tkcanvas
- •Tpic
- •Vgagl
- •Windows
- •Graph-menu
- •Printing
- •Text-menu
- •Wgnuplot.mnu
- •Wgnuplot.ini
- •Xlib
- •Known limitations
- •External libraries

218 |
gnuplot 4.6 |
SVG allows you to embed fonts directly into an SVG document, or to provide a hypertext link to the desired font. The font le option speci es a local le which is copied into the <defs> section of the resulting SVG output le. This le may either itself contain a font, or may contain the records necessary to create a hypertext reference to the desired font. Gnuplot will look for the requested le using the directory list in the GNUPLOT FONTPATH environmental variable. NB: You must embed an svg font, not a TrueType or PostScript font.
Svga
The svga terminal driver supports PCs with SVGA graphics. It can only be used if it is compiled with DJGPP. Its only option is the font.
Syntax:
set terminal svga {"<fontname>"}
Tek40
This family of terminal drivers supports a variety of VT-like terminals. tek40xx supports Tektronix 4010 and others as well as most TEK emulators. vttek supports VT-like tek40xx terminal emulators. The following are present only if selected when gnuplot is built: kc-tek40xx supports MS-DOS Kermit Tek4010 terminal emulators in color; km-tek40xx supports them in monochrome. selanar supports Selanar graphics. bitgraph supports BBN Bitgraph terminals. None have any options.
Tek410x
The tek410x terminal driver supports the 410x and 420x family of Tektronix terminals. It has no options.
Texdraw
The texdraw terminal driver supports the LaTeX texdraw environment. It is intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package.
Points, among other things, are drawn using the LaTeX commands "nDiamond" and "nBox". These commands no longer belong to the LaTeX2e core; they are included in the latexsym package, which is part of the base distribution and thus part of any LaTeX implementation. Please do not forget to use this package.
It has no options.
Tgif
Tgif is an X11-based drawing tool | it has nothing to do with GIF.
The tgif driver supports di erent pointsizes (with set pointsize), di erent label fonts and font sizes (e.g. set label "Hallo" at x,y font "Helvetica,34") and multiple graphs on the page. The proportions of the axes are not changed.
Syntax:
set terminal tgif {portrait | landscape | default} {<[x,y]>} {monochrome | color}
{{linewidth | lw} <LW>} {solid | dashed}
{font "<fontname>{,<fontsize>}"}
where <[x,y]> speci es the number of graphs in the x and y directions on the page, color enables color, linewidth scales all linewidths by <LW>, "<fontname>" is the name of a valid PostScript font, and <fontsize> speci es the size of the PostScript font. defaults sets all options to their defaults: portrait,
[1,1], color, linwidth 1.0, dashed, "Helvetica,18".
gnuplot 4.6 |
219 |
The solid option is usually prefered if lines are colored, as they often are in the editor. Hardcopy will be black-and-white, so dashed should be chosen for that.
Multiplot is implemented in two di erent ways.
The rst multiplot implementation is the standard gnuplot multiplot feature:
set terminal tgif set output "file.obj" set multiplot
set origin x01,y01 set size xs,ys plot ...
...
set origin x02,y02 plot ...
unset multiplot
See set multiplot (p. 127) for further information.
The second version is the [x,y] option for the driver itself. The advantage of this implementation is that everything is scaled and placed automatically without the need for setting origins and sizes; the graphs keep their natural x/y proportions of 3/2 (or whatever is xed by set size).
If both multiplot methods are selected, the standard method is chosen and a warning message is given.
Examples of single plots (or standard multiplot):
set terminal tgif |
# defaults |
set terminal tgif "Times-Roman,24" |
|
set terminal tgif landscape |
|
set terminal tgif landscape solid |
|
Examples using the built-in multiplot mechanism:
set terminal tgif portrait [2,4] |
# |
portrait; 2 plots in the x- |
|
|
# |
and 4 in the |
y-direction |
set terminal tgif [1,2] |
# |
portrait; 1 plot in the x- |
|
|
# |
and 2 in the |
y-direction |
set terminal tgif landscape [3,3] # |
landscape; 3 |
plots in both |
|
|
# |
directions |
|
Tikz
This driver creates output for use with the TikZ package of graphics macros in TeX. It is currently implemented via an external lua script, and set term tikz is a short form of the command set term lua tikz. See term lua (p. 198) for more information. Use the command set term tikz help to print terminal options.
Tkcanvas
This terminal driver generates Tk canvas widget commands based on Tcl/Tk (default) or Perl. To use it, rebuild gnuplot (after uncommenting or inserting the appropriate line in "term.h"), then
gnuplot> set term tkcanvas {perltk} {interactive} gnuplot> set output 'plot.file'
After invoking "wish", execute the following sequence of Tcl/Tk commands:
%source plot.file
%canvas .c
%pack .c
%gnuplot .c

220 |
gnuplot 4.6 |
Or, for Perl/Tk use a program like this:
use Tk;
my $top = MainWindow->new; my $c = $top->Canvas->pack; my $gnuplot = do "plot.pl"; $gnuplot->($c);
MainLoop;
The code generated by gnuplot creates a procedure called "gnuplot" that takes the name of a canvas as its argument. When the procedure is called, it clears the canvas, nds the size of the canvas and draws the plot in it, scaled to t.
For 2-dimensional plotting (plot) two additional procedures are de ned: "gnuplot plotarea" will return a list containing the borders of the plotting area "xleft, xright, ytop, ybot" in canvas screen coordinates, while the ranges of the two axes "x1min, x1max, y1min, y1max, x2min, x2max, y2min, y2max" in plot coordinates can be obtained calling "gnuplot axisranges". If the "interactive" option is speci ed, mouse clicking on a line segment will print the coordinates of its midpoint to stdout. Advanced actions can happen instead if the user supplies a procedure named "user gnuplot coordinates", which takes the following arguments: "win id x1s y1s x2s y2s x1e y1e x2e y2e x1m y1m x2m y2m", the name of the canvas and the id of the line segment followed by the coordinates of its start and end point in the two possible axis ranges; the coordinates of the midpoint are only lled for logarithmic axes.
The current version of tkcanvas supports neither multiplot nor replot.
Tpic
The tpic terminal driver supports the LaTeX picture environment with tpic nspecials. It is an alternative to the latex and eepic terminal drivers. Options are the point size, line width, and dot-dash interval.
Syntax:
set terminal tpic <pointsize> <linewidth> <interval>
where pointsize and linewidth are integers in milli-inches and interval is a oat in inches. If a non-positive value is speci ed, the default is chosen: pointsize = 40, linewidth = 6, interval = 0.1.
All drivers for LaTeX o er a special way of controlling text positioning: If any text string begins with 'f', you also need to include a 'g' at the end of the text, and the whole text will be centered both horizontally and vertically by LaTeX. | If the text string begins with '[', you need to continue it with: a position speci cation (up to two out of t,b,l,r), ']f', the text itself, and nally, 'g'. The text itself may be anything LaTeX can typeset as an LR-box. nrulefgfg's may help for best positioning.
Examples: About label positioning: Use gnuplot defaults (mostly sensible, but sometimes not really best):
set title '\LaTeX\ -- $ \gamma $'
Force centering both horizontally and vertically:
set label '{\LaTeX\ -- $ \gamma $}' at 0,0
Specify own positioning (top here):
set xlabel '[t]{\LaTeX\ -- $ \gamma $}'
The other label { account for long ticlabels:
set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}}'
Vgagl
The vgagl driver is a fast linux console driver with full mouse and pm3d support. It looks at the environment variable SVGALIB DEFAULT MODE for the default mode; if not set, it uses a 256 color mode with the highest available resolution.
Syntax: