Version 6.0 is the start of a new stable release series.
Work on gnuplot 6 has proceeded in parallel with the incremental updates to
version 5.4 over the past three years. The new version introduces extensions
to the gnuplot command language, support for new output protocols, and
additional plotting styles. Backward compatibility is given high priority
in gnuplot development, so users should find no significant changes required
for techniques or code they are currently using with gnuplot 5.
Gnuplot development is tracked in a git repository on SourceForge.
You can generate a complete history of changes using "git log"
after downloading:
git clone -b branch-6-0-stable git://git.code.sf.net/p/gnuplot/gnuplot-main
git log
Release Notes date: 08-Dec-2023
For a detailed list of new features, with illustrations, see
http://gnuplot.info/docs_6.0/NewFeatures.html
For more example plots see
http://gnuplot.info/demo_6.0/
- Function blocks and scoped variables
- Larger collection of special and complex-valued functions
- New plot styles
- 2D plot style `with surface` works in 2D polar coordinates to produce a
solid-fill gridded representation of the plane. This is analogous to the
use of dgrid3d and pm3d to produce a 3D gridded surface.
- 2D plot style `with sectors` renders one annular segment ("sector") for
each line of input data. This style can generate pie and donut charts,
windrose charts, and a polar equivalent to sparse-matrix heatmaps.
- 2D plot style `with lines` now has a filter option `sharpen`.
This filter detects spikes in a function plot that would be missed or
under-represented due to coarse sampling. It adds an additional
sampling point at the location of each such peak.
- 3D plot style `with contourfill` produces 2D or 3D surfaces with
distinct z-ranges indicated by solid color fill.
- Hulls, masks, and smoothing
- A cluster of 2D points can be replaced by a bounding polygon ("hull").
Both convex hulls and concave hulls (χ-shapes) are supported.
- Any hull or other closed path can be used as a mask to display only
selected regions of a pm3d surface or image plot.
- New smoothing option "smooth path" can be used on 2D and 3D curves
that are not monotonic on x or y. This allows smoothing of hulls.
- Named palettes
- The current palette can be saved to a named colormap for future us.
- A predefined palette named "viridis" is provided.
- Plots can specify a previously saved palette by name.
This permits the use of multiple palettes in a single plot command.
- Named palettes can be edited to contain an alpha channel.
- New built-in functions and array operations
- palette(z) returns the current RGB palette color mapping for z.
- rgbcolor("name") returns the 32bit ARGB value for a named color.
- index(Array, element) returns the first index i for which Array[i]
is equal to element.
- split("string", "separator") unpacks the fields in a string into
an array of strings.
- join(array, "separator") is the complement to split().
It concatenates the elements of a string array into a single string.
- `stats <non-existent file>` yields a testable value with no error;
useful to avoid errors or warnings in scripts.
- Program control flow
- New syntax if {...} else if {...} else {...}
- XDG base directory conventions for configuration files are supported.
- `unset warnings` suppresses output of warning messages to the console.
- The `fit` command is protected by exception handling. Control always
returns to the next line of input even in the case of fit errors.
On return FIT_ERROR is non-zero if an error occurred.
- "Watchpoints" are target values associated with individual plots
in a graph. As that plot is drawn, each component line segment is
monitored to see if its endpoints bracket the target value of a
watchpoint coordinate (x, y, or z) or function f(x,y).
If a match is found, the [x,y] coordinates of the match point are
saved for later use. Possible uses include
- find the intersection points of two curves
- find zeros of a function
- find and notate where a dependent variable or function f(x,y)
crosses a threshold value
- use the mouse to track values along multiple plots simultaneously
- New terminals and terminal options
- Terminals that display graphics in the same window as text entry now
support pseudo-mousing; i.e. they respond to arrow keys and other
hot-key bindings during "pause mouse".
- New terminals kittygd and kittycairo provide in-window graphics for
terminal emulators that support the kitty protocol.
- New terminal webp generates a single frame or an animation sequence
using webp encoding. Frames are generated using pngcairo,
then encoded through the WebPAnimEncoder API.
- New terminal block for text-mode pseudo-graphics uses Unicode block
or Braille characters to offer improved resolution compared to the
dumb or caca terminals.
- latex terminals standalone mode updated to work with texlive2023
- Miscellaneous other new features
- Multiplots can now be saved, replotted, and resized interactively.
This is a change from all previous gnuplot versions, where only the
most recent component of a multiplot could be replotted.
- Time unit settings for major and minor axis tics. For example,
minor tic marks can be placed at exactly one month intervals.
- The character sequence $# in a using specifier evaluates to the total
number of columns available in the current line of data.
"plot FOO using 0:(column($# - 1))" plots the last-but-one field of each row.
- keyword binvalue=avg plots the average, rather than the sum, of binned data.
- "set colorbox bottom" places the color box underneath the plot.
- "set pm3d spotlight" adds a user-controlled spotlight to the lighting model.
- New key layout options to force specific width or number of columns.
Automatic positioning of the key on the page can be manually tweaked
by giving an offset.
- "set isotropic" adjusts the axis scaling in both 2D and 3D plots such
that x, y, and z axes all have the same scale.
- Text rotation angles are not limited to integral degree values.
- Data-driven color assignments in plot style "histograms".
- New plot style "with contourfill" generates 2D and 3D contour plots with
solid fill areas rather than lines.
- Support building against Qt6
- ./configure falls back to Qt5 if the Qt6 libraries are not found
- Japanese documentation updated
- added missing file title-ja.tex, build dependencies for mingw
- New configure option --enable-stable-sort
- Use mergesort rather than qsort if the system provides it.
- If neither mergesort nor glibc stable qsort is available,
modify internal gnuplot structures to contain a secondary sort key
- Render color gradient in colorbox as a pixel array
- "reset session" restores initial state of all linetype properties
- previously only the colors were restored
- now it also reinitializes linewidth, point and dash properties
- postscript terminal now handles pixmaps
- svg terminal now correctly tracks pattern-fill color
- Replotting and mousing multiplots
- new commands "remultiplot"
O new command "set mouse multiplot" (NB: reverted in 6.0)
- command sequence to regenerate full multiplot is saved to a datablock
- Additional keyentry options to construct custom keys
- keyentry "text" can be used to place a secondary title in the key
- Minor fixes
- correct build of postscript terminal when libgd and cairo are not present
- strip trailing CR from function blocks read from a dos file
- use 64-bit integers for iteration
- "unset pointintervalbox" disables the box rather than setting it to default size
- setting minitic scale to 0 does not disable the corresponding grid lines
- use of stacked histograms with variable number of data columns
- Replotting and mousing multiplots
- now working much more comprehensively
- revert "set mouse multiplot" as a separate command; it's now always in effect
- "plot with polygons" now guarantees that the border of each polygon is a closed curve
- pdf output from the cairo terminals now conforms to %PDF-1.5
The "gnuplot mode" elisp and TeX files for use with emacs are now
maintained as a separate project: https://github.com/bruceravel/gnuplot-mode
so there is no longer a configuration option --with-lisp-files.
LaTeX-related terminal drivers latex, emtex, eepic, and tpic are no longer
built by default. Their closest equivalent is the new pict2e terminal, but
LaTeX users who want support for the full range of gnuplot plot styles are
recommended to use the cairolatex or tikz terminals.
The 6.0 source code supports three primary cross-platform interactive
modes in addition to several platform-specific modes.
- Qt
The qt terminal supports interactive display with menu-driven
output to png, svg or pdf. If either Qt6 or Qt5 is detected by the
configure script, this will be the default terminal. It is now the
fastest and most full-featured interactive terminal option.
To disable this terminal or force use of Qt5 even if Qt6 is present
- ./configure --with-qt=qt5
- ./configure --without-qt
- Cairo/pango/wxWidgets
This set of terminals includes pngcairo, pdfcairo, epscairo, and cairolatex
for output to a file. The wxt terminal provides interactive display
All of these will be built by default if the configuration script finds
the required libcairo, libpango, libcairo, libwxgtk, and related
support libraries
To disable these terminals:
- ./configure --without-cairo
- ./configure --with-cairo --disable-wxwidgets
- X11 (the "classic" interactive interface)
This used to be the preferred interactive interface, but the newer
wxt and qt terminals offer nicer output and a wider range of features.
Of course the terminals (output modes) present in previous gnuplot versions
are also still available. These include, among many more obscure options:
The sixel and kitty terminals display graphics in-line with the commands
typed in a suitable terminal emulator window. For example "xterm -ti 340"
emulates a vt340 with indexed color sixel graphics.
The KDE desktop konsole terminal provides RGB color sixel graphics
and 32-bit color + alpha channel graphics using the kitty protocol.
The yaft terminal emulator can provide sixel graphics at linux console
level with no x11 or other windowing system active.
- Mouseable output for display on the web can be created using either
the canvas terminal (HTML5 2D canvas element) or the svg terminal.
Both allow zooming, toggling plot elements on/off, and user-scriptable
hot keys.
You can download a source tarball for the current gnuplot version
from the gnuplot development site on SourceForge.
http://sourceforge.net/projects/gnuplot
Some platform-specific installation tips are given in the INSTALL
file of the source package; the short version for linux/unix-like
systems is to unpack the tarball and then
build it:
cd gnuplot-6.0.0 ; ./configure ; make
test it:
make check
install it:
make install
Pay careful attention to the output of the ./configure script.
It may indicate that some output modes have been omitted because the
necessary support libraries were not found. In general you need to have
previously installed the "-devel-" versions of these libraries.
Please report all bugs and installation problems to the bug tracker
on SourceForge:
https://sourceforge.net/p/gnuplot/bugs/
Gnuplot development is ongoing. The development branch contains preliminary
implementations of new features. The current development version is 6.1.
Once version 6.0 is released, bugfixes will appear in patchlevel releases
6.0.1, 6.0.2, etc., approximately twice a year or as needed to correct a
serious regression.