Gnuplot: Difference between revisions
imported>ArmyXn |
imported>Theki |
||
| Line 9: | Line 9: | ||
| caption = 3D rendering of an [[ellipsoid]] by gnuplot | | caption = 3D rendering of an [[ellipsoid]] by gnuplot | ||
| released = {{Start date and age|1986|df=yes}} | | released = {{Start date and age|1986|df=yes}} | ||
| latest release version = {{wikidata|property|reference|P348}} | |||
| latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}} | |||
| programming language = [[C (programming language)|C]] | | programming language = [[C (programming language)|C]] | ||
| genre = [[List of graphing software|Plotting]] | | genre = [[List of graphing software|Plotting]] | ||
| Line 48: | Line 50: | ||
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>{{Cite web|url=http://www.gnuplot.info/faq/faq.html#x1-70001.2|title=gnuplot FAQ|website=Gnuplot.info|access-date=20 June 2024}}</ref> | 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>{{Cite web|url=http://www.gnuplot.info/faq/faq.html#x1-70001.2|title=gnuplot FAQ|website=Gnuplot.info|access-date=20 June 2024}}</ref> | ||
Support of Epidemic daily and weekly formats in Version 5.4.2 is a result of pandemic | Support of Epidemic daily and weekly formats in Version 5.4.2 is a result of pandemic [[COVID-19_pandemic|Coronavirus]] data needs.<ref>{{Cite web |url=https://gnuplot.sourceforge.net/ReleaseNotes_5_4_2.html |title=Gnuplot Version 5.4.2 Release Notes |access-date=2021-06-08 |archive-date=2021-06-08 |archive-url=https://web.archive.org/web/20210608120649/http://gnuplot.sourceforge.net/ReleaseNotes_5_4_2.html |url-status=live }}</ref> | ||
== Distribution terms == | == Distribution terms == | ||
| Line 77: | Line 79: | ||
</blockquote> | </blockquote> | ||
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 (operating system)|Fedora]]. The [[Open-source software#The Open Source Definition|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. | 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 (operating system)|Fedora]]. The [[Open-source software#The Open Source Definition|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.{{cn|date=October 2025}} | ||
Newer gnuplot modules (e.g. Qt, wxWidgets, and cairo drivers) have been contributed under dual-licensing terms, e.g. gnuplot + BSD or gnuplot + GPL. | Newer gnuplot modules (e.g. Qt, wxWidgets, and cairo drivers) have been contributed under dual-licensing terms, e.g. gnuplot + BSD or gnuplot + GPL.{{cn|date=October 2025}} | ||
== GUIs and programs that use gnuplot == | == GUIs and programs that use gnuplot == | ||
| Line 85: | Line 87: | ||
* [[gretl]], a [[statistics package]] for [[econometrics]] | * [[gretl]], a [[statistics package]] for [[econometrics]] | ||
* JGNUPlot, a java-based GUI<ref>{{Cite web|url= | * JGNUPlot, a java-based GUI<ref>{{Cite web|url=https://jgp.sourceforge.net/|title=JGNUplot homepage|website=Jgp.sourceforge.net|access-date=27 June 2022}}</ref> | ||
* Kayali<ref>{{Cite web|url=https://sourceforge.net/projects/kayali/|title=Kayali|website=Sourceforge.net|date=19 April 2013 |access-date=27 June 2022}}</ref> a [[computer algebra system]] | * Kayali<ref>{{Cite web|url=https://sourceforge.net/projects/kayali/|title=Kayali|website=Sourceforge.net|date=19 April 2013 |access-date=27 June 2022}}</ref> a [[computer algebra system]] | ||
* xldlas, an old X11 statistics package<ref>{{Cite web |url=http://linux.maruhn.com/sec/xldlas.html |title=Xldlas - A basic statistical package for X windows |access-date=2014-10-30 |archive-url=https://web.archive.org/web/20141031022018/http://linux.maruhn.com/sec/xldlas.html |archive-date=2014-10-31 |url-status=dead }}</ref> | * xldlas, an old X11 statistics package<ref>{{Cite web |url=http://linux.maruhn.com/sec/xldlas.html |title=Xldlas - A basic statistical package for X windows |access-date=2014-10-30 |archive-url=https://web.archive.org/web/20141031022018/http://linux.maruhn.com/sec/xldlas.html |archive-date=2014-10-31 |url-status=dead }}</ref> | ||
| Line 96: | Line 98: | ||
* [[GNU Octave]], a mathematical programming language | * [[GNU Octave]], a mathematical programming language | ||
* statist, a terminal-based program<ref>{{Cite web|url=http://wald.intevation.org/projects/statist/|title = Wald: Statist: Project Home|website=Wald.intevation.org}}</ref> | * statist, a terminal-based program<ref>{{Cite web|url=http://wald.intevation.org/projects/statist/|title = Wald: Statist: Project Home|website=Wald.intevation.org}}</ref> | ||
* gplot.pl provides a simpler command-line interface.<ref>{{Cite web|url= | * gplot.pl provides a simpler command-line interface.<ref>{{Cite web|url=https://gplot.sourceforge.net/|title=GPlot|website=Gplot.sourceforge.net|access-date=27 June 2022}}</ref> | ||
* [http://github.com/dkogan/feedgnuplot feedgnuplot] provides a plotting of stored and realtime data from a pipe | * [http://github.com/dkogan/feedgnuplot feedgnuplot] provides a plotting of stored and realtime data from a pipe | ||
* ElchemeaAnalytical,<ref>{{Cite web|url=https://www.elchemea.com/|title=Elchemea Analytical|website=Elchemea.com|access-date=27 June 2022}}</ref> an [[impedance spectroscopy]] plotting and fitting program developed by DTU Energy<ref>{{Cite web|url=http://www.energy.dtu.dk/english|title=DTU Energy|website=Energy.dtu.dk|access-date=2016-05-24|archive-date=2021-04-14|archive-url=https://web.archive.org/web/20210414194356/https://www.energy.dtu.dk/english|url-status=dead}}</ref> | * ElchemeaAnalytical,<ref>{{Cite web|url=https://www.elchemea.com/|title=Elchemea Analytical|website=Elchemea.com|access-date=27 June 2022}}</ref> an [[impedance spectroscopy]] plotting and fitting program developed by DTU Energy<ref>{{Cite web|url=http://www.energy.dtu.dk/english|title=DTU Energy|website=Energy.dtu.dk|access-date=2016-05-24|archive-date=2021-04-14|archive-url=https://web.archive.org/web/20210414194356/https://www.energy.dtu.dk/english|url-status=dead}}</ref> | ||
| Line 103: | Line 105: | ||
== Programming and application interfaces == | == Programming and application interfaces == | ||
gnuplot can be used from various programming languages to graph data, including [[C++]] (via [http://arminms.github.io/g3p G3P]), [[Perl]] (via [[Perl Data Language|PDL]] and other [[CPAN]] packages), [[Python (programming language)|Python]] (via [https://github.com/dkogan/gnuplotlib gnuplotlib], [ | gnuplot can be used from various programming languages to graph data, including [[C++]] (via [http://arminms.github.io/g3p G3P]), [[Perl]] (via [[Perl Data Language|PDL]] and other [[CPAN]] packages), [[Python (programming language)|Python]] (via [https://github.com/dkogan/gnuplotlib gnuplotlib], [https://gnuplot-py.sourceforge.net/ Gnuplot-py] and [[SageMath]]), [[R (programming language)|R]] via ([https://cran.r-project.org/web/packages/Rgnuplot/index.html Rgnuplot]), [[Julia (programming language)|Julia]] (via [https://github.com/mbaz/Gaston.jl Gaston.jl]), [[Java (programming language)|Java]] (via [https://github.com/mleoking/JavaGnuplotHybrid JavaGnuplotHybrid] and [https://jgnuplot.sourceforge.net/ jgnuplot]), [[Ruby (programming language)|Ruby]] (via [https://github.com/rdp/ruby_gnuplot Ruby Gnuplot]), [[Ch (computer programming)|Ch]] (via [http://www.softintegration.com/docs/ch/plot/ Ch Gnuplot]), [[Haskell (programming language)|Haskell]] (via [https://www.haskell.org/haskellwiki/Gnuplot Haskell gnuplot]), [[Fortran 95]],<ref>{{cite web|last1=Singh|first1=Madhusudan|title=gnuplotfortran - the Fortran 95 interface to gnuplot|url=https://gnuplotfortran.sourceforge.net|website=gnuplotfortran.sourceforge.net|access-date=10 May 2016}}</ref> [[Smalltalk]] ([[Squeak]] and [[GNU Smalltalk]]) and [[Rust (programming language)|Rust]] (via [https://github.com/SiegeLord/RustGnuplot RustGnuplot]). | ||
gnuplot also supports [[Pipe (Unix)|piping]], which is typical of scripts.<ref>{{Cite web|url=https://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html|title=2-cent Tip: Piping to GNU Plot from C|website=Linuxgazette.net|access-date=27 June 2022}}</ref> For script-driven graphics, gnuplot is one of the most popular programs.{{citation needed|date=October 2014}} | gnuplot also supports [[Pipe (Unix)|piping]], which is typical of scripts.<ref>{{Cite web|url=https://linuxgazette.net/168/misc/lg/2_cent_tip__piping_to_gnu_plot_from_c.html|title=2-cent Tip: Piping to GNU Plot from C|website=Linuxgazette.net|access-date=27 June 2022}}</ref> For script-driven graphics, gnuplot is one of the most popular programs.{{citation needed|date=October 2014}} | ||
| Line 122: | Line 124: | ||
== Further reading and external links == | == Further reading and external links == | ||
{{Commons category| | {{Commons category|gnuplot}} | ||
{{Wikibooks|gnuplot}} | {{Wikibooks|gnuplot}} | ||
{{Wikibooks|Ad Hoc Data Analysis From The Unix Command Line|Quick Plotting With gnuplot}} | {{Wikibooks|Ad Hoc Data Analysis From The Unix Command Line|Quick Plotting With gnuplot}} | ||
Latest revision as of 19:47, 3 October 2025
Template:Short description Script error: No such module "Distinguish". Template:Lowercase title Template:More citations needed Script error: No such module "Infobox".Template:Template otherScript error: No such module "Check for unknown parameters".Template:Main other
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).[1] 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."[2] Despite its name, this software is not part of the GNU Project.
Features
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.[3]
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.
set title "Some Math Functions"
set xrange [-10:10]
set yrange [-2:2]
set zeroaxis
plot (x/4)**2, sin(x), 1/x
Script error: No such module "Gallery".
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".[4]
Support of Epidemic daily and weekly formats in Version 5.4.2 is a result of pandemic Coronavirus data needs.[5]
Distribution terms
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).[6]
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.[7]
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.Script error: No such module "Unsubst".
Newer gnuplot modules (e.g. Qt, wxWidgets, and cairo drivers) have been contributed under dual-licensing terms, e.g. gnuplot + BSD or gnuplot + GPL.Script error: No such module "Unsubst".
GUIs and programs that use gnuplot
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[8]
- Kayali[9] a computer algebra system
- xldlas, an old X11 statistics package[10]
- gnuplotxyz, an old Windows program[11]
- wxPinter, a graphical plot manager for gnuplot[12]
- 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[13]
- gplot.pl provides a simpler command-line interface.[14]
- feedgnuplot provides a plotting of stored and realtime data from a pipe
- ElchemeaAnalytical,[15] an impedance spectroscopy plotting and fitting program developed by DTU Energy[16]
- Gnuplot add-in for Microsoft Excel[17]
- Calc, the GNU Emacs calculator[18]
Programming and application interfaces
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,[19] Smalltalk (Squeak and GNU Smalltalk) and Rust (via RustGnuplot).
gnuplot also supports piping, which is typical of scripts.[20] For script-driven graphics, gnuplot is one of the most popular programs.Script error: No such module "Unsubst".
Gnuplot output formats
Gnuplot allows the user to display or store plots in several ways:[21][22]
- 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
Script error: No such module "Portal".
References
Further reading and external links
Template:Sister project Template:Sister project Template:Sister project
- 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
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Visualize your data with gnuplot: an IBM tutorial
- ↑ Gnuplot 5.0 Reference Manual, 2015, Template:ISBN
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- Pages with script errors
- 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