||This article has an unclear citation style. (March 2014)|
3D rendering of an ellipsoid by gnuplot
|Stable release||4.6.5 (February 26, 2014[±])|
|Preview release||4.7 [±]|
|License||Open source (own license)|
gnuplot is a command-line program that can generate two- and three-dimensional plots of functions, data, and data fits. It is frequently used for publication-quality graphics as well as education. The program runs on all major computers and operating systems (GNU/Linux, Unix, Microsoft Windows, Mac OS X, and others). It is a program with a fairly long history, dating back to 1986. Despite its name, this software is not part of the GNU project, nor is it distributed under the GNU General Public License (GPL) or any other GNU license, but its own more restrictive open source license.
gnuplot can produce output directly on screen, or in many formats of graphics files, including Portable Network Graphics (PNG), Encapsulated PostScript (EPS), Scalable Vector Graphics (SVG), JPEG and many others. It is also capable of producing LaTeX code that can be included directly in LaTeX documents, making use of LaTeX's fonts and powerful formula notation abilities. The program can be used both interactively and in batch mode using scripts.
gnuplot is used as the plotting engine of Maxima, and gretl, and it can be used from various languages, including Perl (via CPAN), Python (via Gnuplot-py and SAGE), Java (via JavaGnuplotHybrid), Ruby (via Ruby Gnuplot), Ch (via Ch Gnuplot), and Smalltalk (Squeak and GNU Smalltalk). gnuplot also supports piping.
The gnuplot core code is programmed in C. Modular subsystems for output via Qt, wxWidgets, and LaTeX/TikZ/ConTeXt are written in C++ and lua.
The code below creates the graph to the right.
set title "Some Math Functions" set xrange [-10:10] set yrange [-2:2] set zeroaxis plot (x/4)**2, sin(x), 1/x
Gnuplot.py A Python packages that interfaces to gnuplot
Despite gnuplot's name, it is not part of or related to the GNU Project, nor does it use the GNU General Public License. Therefore, any reference to "GNUplot" is incorrect. The program was originally going to be called "newplot" but there was already a program of that name, so the spelling "gnuplot" was chosen instead.
Official source code to gnuplot is freely redistributable, but modified versions thereof are not. The gnuplot license instead recommends distribution of patches against official releases, optionally accompanied by officially released source code. Binaries may be distributed along with the unmodified source code and any patches applied thereto. Contact information must be supplied with derived works for technical support for the modified software.
Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version.
Despite this restriction, gnuplot is accepted and used by many GNU packages and is widely included in GNU/Linux distributions including the stricter ones such as Debian and Fedora. The OSI Open Source Definition and the Debian Free Software Guidelines specifically allow for restrictions on distribution of modified source code, given explicit permission to distribute both patches and source code.
Newer gnuplot modules (e.g. Qt, wxWidgets, and cairo drivers) have been contributed under dual-licensing terms, e.g. gnuplot + BSD or gnuplot + GPL.
For script-driven graphics, gnuplot is by far the most popular program. Pyxplot (Home page) is a free plotting software that has a very similar syntax but tries to enhance gnuplot's data processing and scripting capabilities.
For interactive plotting through a graphical user interface (GUI), one would use one of the following open-source programs:
- QtiPlot, inspired by the proprietary program Origin
- SciDAVis, a fork of QtiPlot
- LabPlot, project merged with SciDAVis
- Philipp K. Janert (2009). Gnuplot in Action. Manning Publications. ISBN 978-1933988399.
- Lee Phillips (2012). gnuplot Cookbook. Packt Publishing. ISBN 978-1849517249.
|Wikimedia Commons has media related to Gnuplot diagrams.|
|Wikibooks has a book on the topic of: gnuplot|
|The Wikibook Ad Hoc Data Analysis From The Unix Command Line has a page on the topic of: Quick Plotting With gnuplot|