Gnuplot

from Wikipedia, the free encyclopedia
Gnuplot

Ellipsoid
Basic data

Publishing year 1986
Current  version 5.2.8
( November 27, 2019 )
operating system Unix , GNU / Linux , Microsoft Windows , IBM OS / 2 , DOS , macOS , VMS , GEM , MorphOS
programming language C.
category Graphics software
License Gnuplot Copyright
gnuplot.sourceforge.net
Klein bottle made with Gnuplot
Sample video
Example of a fit with gnuplot on real measurement data ( acceleration during free fall , y component of a horizontal throw ).

Gnuplot ( spelling : gnuplot ) is a script or command line controlled computer program for the graphical representation of measurement data and mathematical functions ( function plotter ). The Gnuplot project has been continuously promoted by an international team of volunteer developers since 1986. The source code has been managed by SourceForge since 2000 .

Range of functions

Gnuplot creates various two- and three-dimensional plots that can be interactively manipulated (especially zooming in and rotating). The plots can be displayed on the screen and saved in various graphic formats ( e.g. EPS , PNG , SVG and others).

On the one hand, Gnuplot allows the definition of your own functions that can be plotted. On the other hand, Gnuplot also reads (measurement) data from files and displays them graphically. The data can be post-processed using functions. Gnuplot can also adapt functional relationships to the data ( fitting , compensation calculation ).

Application area

Gnuplot comes from the Unix world, but runs on all common operating systems . It does not have its own graphical user interface , but is operated from the command line or controlled via scripts . In addition, there are a number of graphical interfaces for the program, such as wxPinter, Xgfe , PlotDrop or Qgfe under Unix and wgnuplot under Windows .

Gnuplot is very popular in the scientific field because of its clear plots and the ability to automatically generate plots from data or measured values ​​under script control. The program processes large amounts of data efficiently and is space-saving and fast compared to commercial alternatives. The original data always remain untouched and do not have to be kept in a “worksheet”.

Embedding

Gnuplot is designed as an independent application program, not as a graphics library . In order to integrate Gnuplot as a subroutine in other applications, a Gnuplot process is started and controlled via a pipe . Graphics commands and data can be sent to Gnuplot and processed via the pipe.

The users of this operating mode include, for example, the numerical software GNU Octave and the computer algebra system Maxima .

Name and license

Gnuplot is distributed under a free license that allows copies and modifications of the source code. However, modified versions may only be distributed as patches .

Despite its name, Gnuplot is not associated with the GNU project and does not use the GNU General Public License : the program was originally supposed to be called Newplot . Since software already existed under this name, the authors simply renamed their project Gnuplot , which in American English is homophonic to the original name (= phonetically identical). The GNU project calls its plot software plotutils .

history

version publication Remarks
Older version; no longer supported: 4.0 October 27, 2004 The following has been added: the function "defined (<variable name>)", the plot option "smooth frequency", the grid options "layerdefault, front, back"
Older version; no longer supported: 4.4 March 13, 2010 The following has been added: new drivers for pngcairo pdfcairo wxt, client-side interactive display with the HTML5 canvas element, better internationalization, support for transparency, new plot styles: circles rgbalpha
Older version; no longer supported: 4.6 March 12, 2012 Introduction of command blocks using curly brackets
Older version; still supported: 5.0 December 31, 2014 New plot styles and coordinate systems, the fit command can now handle up to twelve variables, the RGB colors can now have an alpha channel and other changes
Older version; still supported: 5.2 August 31, 2017 Connection of two axes via non-linear function, extended support for polar display, new array data type, filter for creating histograms, new plot styles and other changes
Current version: 5.4 July 16, 2020 Support for voxel plots, support for 64-bit arithmetic
Legend:
Older version; no longer supported
Older version; still supported
Current version
Current preliminary version
Future version

Examples

Math functions

The function is output, for example, with the following commands:

f(x)=x**2
plot f(x)

or simply

plot x**2

The graph generated with Gnuplot looks as follows if SVG is selected as the output format:

Example of a Gnuplot graph

External data chart

Gnuplot can also be used to create diagrams for any data compilation: The data on which the curve is based were in separate files when they were created (in this case Banglapedia.dat and World_Factbook.dat ) and can be viewed on the image description page.

set terminal svg enhanced size 350 200
set border 31 linewidth .3 # schmale Umgrenzung
set output "bangladesh_population_1900to2010.svg"
set xlabel "Year"
set ylabel "Population (millions)"
set key left top
plot "Banglapedia.dat" using 1:($2/1e6) with linespoints title 'Banglapedia' ,\
     "World_Factbook.dat" using 1:($2/1e6) with linespoints title 'World Factbook'

The code generates the following graphic:

A diagram made with Gnuplot

literature

  • Philipp K. Janert: Gnuplot in action - understanding data with graphs. Manning, 2010, ISBN 978-1-933988-39-9 .
  • Lee Phillips: Gnuplot Cookbook - over 80 recipes to visually explore the full range of features of the world's preeminent open source graphic system. Packt Publishing, 2012, ISBN 978-1-84951-724-9 .
  • Thomas Williams, Colin Kelley: Gnuplot 5.0 - Reference manual. Samurai Media Limited, 2015, ISBN 978-988-14436-4-9 .

Web links

Commons : Sample plots with source code  - collection of images, videos and audio files

Individual evidence

  1. www.gnuplot.info .
  2. ^ The gnuplot Open Source Project on Open Hub: Languages ​​Page . In: Open Hub . (accessed on July 14, 2018).
  3. ^ Daniel S. Steingrube: Stone Pit . Archived from the original on October 26, 2015. Retrieved on August 21, 2015.
  4. Gnuplot 4.0. (tar.gz) Retrieved on March 20, 2012 (English, the data are from the NEWS file.).
  5. GNUPLOT VERSION 4.4.0 Announce. (txt) Retrieved March 20, 2012 (English).
  6. Gnuplot 4.6 supports code blocks. Retrieved March 20, 2012 .
  7. GNUPLOT Version 5.0 Release Notes. Retrieved January 12, 2015 .
  8. GNUPLOT Version 5.2 Release Notes. In: gnuplot project page. August 30, 2017, accessed September 8, 2017 .
  9. Gnuplot Version 5.4 Release Notes. In: gnuplot project page. July 16, 2020, accessed on July 23, 2020 .