Gnuplot
Template:Short description Template:Distinguish Template:Lowercase title Template:More citations needed Template:Infobox software
gnuplot is a command-line and GUI program that can generate two- and three-dimensional plots of functions, data, and data fits. The program runs on all major computers and operating systems (Linux, Unix, Microsoft Windows, macOS, FreeDOS, and many others).<ref>Gnuplot 5.0 Reference Manual, 2015, Template:ISBN</ref> Originally released in 1986, its listed authors are Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell, Gershon Elber, Alexander Woo "and many others."<ref>Template:Cite web</ref> Despite its name, this software is not part of the GNU Project.
Features
[edit]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.<ref>Template:Cite web </ref>
gnuplot can read data in multiple formats, including ability to read data on the fly generated by other programs (piping), create multiple plots on one image, do 2D, 3D, contour plots, parametric equations, supports various linear and non-linear coordinate systems, projections, geographic and time data reading and presentation, box plots of various forms, histograms, labels, and other custom elements on the plot, including shapes, text and images, that can be set manually, computed by script or automatically from input data.
gnuplot also provides scripting capabilities, looping, functions, text processing, variables, macros, arbitrary pre-processing of input data (usually across columns), as well as the ability to perform non-linear multi-dimensional multi-set weighted data fitting (see Curve fitting and Levenberg–Marquardt algorithm).
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. <syntaxhighlight lang="gnuplot"> set title "Some Math Functions" set xrange [-10:10] set yrange [-2:2] set zeroaxis plot (x/4)**2, sin(x), 1/x </syntaxhighlight>
The name of this program was originally chosen to avoid conflicts with a program called "newplot", and was originally a compromise between "llamaplot" and "nplot".<ref>Template:Cite web</ref>
Support of Epidemic daily and weekly formats in Version 5.4.2 is a result of pandemic coronavirus data needs.<ref>Template:Cite web</ref>
Distribution terms
[edit]Template:Infobox software license
Despite gnuplot's name, it is not named after, part of or related to the GNU Project, nor does it use the GNU General Public License. It was named as part of a compromise by the original authors, punning on gnu (the animal) and newplot (a planned name that was discarded due to already being used).<ref name="gnuplot faq">Template:Cite web</ref>
Official source code to gnuplot is freely redistributable, but modified versions thereof are not. The gnuplot license allows instead 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.<ref name=lice>Template:Cite web</ref>
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 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.
GUIs and programs that use gnuplot
[edit]Several third-party programs have graphical user interfaces that can be used to generate graphs using gnuplot as the plotting engine. These include:
- gretl, a statistics package for econometrics
- JGNUPlot, a java-based GUI<ref>Template:Cite web</ref>
- Kayali<ref>Template:Cite web</ref> a computer algebra system
- xldlas, an old X11 statistics package<ref>Template:Cite web</ref>
- gnuplotxyz, an old Windows program<ref>Template:Cite web</ref>
- wxPinter, a graphical plot manager for gnuplot<ref>Template:Cite web</ref>
- Maxima is a text-based computer algebra system which itself has several third-party GUIs
- REDUCE is a text-based computer algebra system; versions using CSL have a GUI and there are several third-party GUIs
Other programs that use gnuplot include:
- GNU Octave, a mathematical programming language
- statist, a terminal-based program<ref>Template:Cite web</ref>
- gplot.pl provides a simpler command-line interface.<ref>Template:Cite web</ref>
- feedgnuplot provides a plotting of stored and realtime data from a pipe
- ElchemeaAnalytical,<ref>Template:Cite web</ref> an impedance spectroscopy plotting and fitting program developed by DTU Energy<ref>Template:Cite web</ref>
- Gnuplot add-in for Microsoft Excel<ref>Template:Cite web</ref>
- Calc, the GNU Emacs calculator<ref>Template:Cite web</ref>
Programming and application interfaces
[edit]gnuplot can be used from various programming languages to graph data, including C++ (via G3P), Perl (via PDL and other CPAN packages), Python (via gnuplotlib, Gnuplot-py and SageMath), R via (Rgnuplot), Julia (via Gaston.jl), Java (via JavaGnuplotHybrid and jgnuplot), Ruby (via Ruby Gnuplot), Ch (via Ch Gnuplot), Haskell (via Haskell gnuplot), Fortran 95,<ref>Template:Cite web</ref> Smalltalk (Squeak and GNU Smalltalk) and Rust (via RustGnuplot).
gnuplot also supports piping, which is typical of scripts.<ref>Template:Cite web</ref> For script-driven graphics, gnuplot is one of the most popular programs.Template:Citation needed
Gnuplot output formats
[edit]Gnuplot allows the user to display or store plots in several ways:<ref>Template:Cite web</ref><ref>Template:Cite web</ref>
- On the console, such as dumb, sixel.
- In a desktop window, such as Qt, wxt, X11, aquaterm, win.
- Embedded in a web page, such as SVG, HTML5, PNG, JPEG, animated GIF.
- File formats designed for document processing, such as PostScript, PDF, cgm, emf, LaTeX variants.
See also
[edit]References
[edit]Further reading and external links
[edit]Template:Commons category Template:Wikibooks Template:Wikibooks
- Template:Official website
- Template:SourceForge
- Gnuplot 5: an interactive ebook about gnuplot v.5.
- gnuplotting: a blog of gnuplot examples and tips
- spplotters: a blog of gnuplot examples and tips
- gnuplot surprising: a blog of gnuplot examples and tips
- gnuplot online: WebAssembly compiled online gnuplot v.5.x
- Template:Cite book
- Template:Cite book
- Template:Cite book
- Visualize your data with gnuplot: an IBM tutorial
- Pages with broken file links
- Articles containing video clips
- Computer animation
- Cross-platform free software
- Data analysis software
- Free 3D graphics software
- Free educational software
- Free mathematics software
- Free plotting software
- Free software programmed in C
- Plotting software
- Regression and curve fitting software
- Software that uses wxWidgets
- Software that uses Qt