gnuplot
Gnuplot is a portable, command-line driven graphing utility designed for plotting mathematical functions and data interactively or via scripts, supporting both two-dimensional and three-dimensional visualizations across multiple platforms including Linux, Windows, macOS, OS/2, VMS, and others.[1] Originally developed in 1986 by Thomas Williams and Colin Kelley as a tool for scientific plotting on various terminals, gnuplot has been actively maintained and enhanced by a volunteer community ever since, with its first release (version 1.0) appearing that same year.[2] Key milestones include version 5.0 in 2015, which introduced improved Unicode support and new plot styles such as parallelaxes, version 5.4 in July 2020 adding features like new terminals for modern output formats including Qt and enhanced Cairo support, and the latest major release, version 6.0 in December 2023 (with patches up to 6.0.3 as of June 2025), which expanded support for advanced rendering options such as the canvas terminal for HTML5 output.[1][3][4][5] Despite its name, gnuplot is not part of the GNU Project and is distributed under a custom copyright license that allows free use, modification, and redistribution without requiring payment—though with conditions for modified versions, such as distributing changes as patches—and is not compatible with the GPL.[1][6] It excels in generating high-quality output in formats like PostScript, PDF, PNG, SVG, and LaTeX, making it a staple for researchers, engineers, and educators in fields such as physics, mathematics, and data analysis.[3] Gnuplot's syntax emphasizes simplicity and flexibility, enabling users to define plots using functions, data files, or even statistical fits, and it serves as an embedded plotting engine for software like Octave and Maxima.[1] Its cross-platform portability and lack of dependency on graphical user interfaces ensure reliability in both interactive sessions and automated batch processing, contributing to its enduring popularity in computational environments.[3]History and Development
Origins
Gnuplot was initially developed in 1986 by Thomas Williams and Colin Kelley at Villanova University, where they were students and system administrators in an electrical engineering VLSI lab with access to graphics terminals.[7][8] The tool emerged as a standalone plotting utility designed for Unix systems, starting as a personal project to address the limitations of existing plotting software available at the time. Written in C, the first version ran on VAX/VMS before being ported to Unix variants, reflecting the developers' need for a simple, interactive way to generate graphs during their coursework—Williams in differential equations and Kelley in electromagnetics.[7] The original purpose of gnuplot was to enable scientists and students to visualize mathematical functions and data interactively, supporting both 2D and 3D plots from functions or data files.[1] This focus on accessibility and portability made it a practical alternative to proprietary or less flexible tools, emphasizing command-line driven operation for quick iteration in academic settings. By the late 1980s, gnuplot saw early adoption in research and educational environments, particularly among Unix users in physics, engineering, and mathematics communities, due to its free distribution and ease of use for generating publication-quality output.[7] Key early milestones included the first public release around 1986–1987, when it was shared openly via academic newsgroups such as those in the sci.* hierarchy, fostering community contributions.[8] By 1989, enhancements like initial support for PostScript output were integrated, allowing high-quality vector graphics for printing and further broadening its utility in scientific documentation; concurrent porting efforts extended compatibility across various Unix systems, solidifying its role as a cross-platform standard.[7][9]Version History
Gnuplot's development began in the mid-1980s, with version 1.0 released in 1986 as a basic tool for 2D plotting of functions and data from files.[10] Version 2.0 arrived in 1990, expanding output support to diverse devices including pen plotters and early personal computers like Atari and Amiga systems.[10] Version 3.0, released in 1991, introduced 3D plotting capabilities via thesplot command, enabling surface and volumetric visualizations.[11]
The long-awaited version 4.0 debuted in 2004, featuring improved scripting through enhanced command options, new terminals for better output integration, the pm3d style for colored surfaces, filled boxes, arrows, and expanded text encoding support.[1][12]
Version 5.0, released on December 31, 2014, brought enhancements to data input and processing, including new interactive terminals like Qt and Cairo-based drivers for dynamic displays and exports to formats such as PDF and SVG, while maintaining strong backward compatibility for existing scripts.[13]
Version 6.0 marked a major update on December 8, 2023, adding advanced plot styles including convex and concave hulls for data envelopes, masks for selective surface rendering, and smoothing options, alongside new built-in functions and expanded array operations for more sophisticated data manipulation.[14][15][16]
The most recent stable release, version 6.0.3, was issued on June 3, 2025, incorporating bug fixes for array operations, palette handling in color mappings, and various terminal drivers to improve reliability and performance.[5]
Gnuplot is maintained by a dedicated volunteer team through its primary repository on SourceForge, with a read-only mirror on GitHub; detailed release notes accompany each update, highlighting changes such as the new built-in functions and control structures in version 6.[1][17]
Key long-term maintainer Ethan A. Merritt has guided the project since the 1990s, contributing extensively to core features like the PNG driver and release management, while recent volunteers such as Mojca Miklavec have supported documentation, configuration, and integration efforts.[10][18]
Core Functionality
Plotting Capabilities
Gnuplot supports a wide range of 2D and 3D plotting capabilities, enabling the visualization of mathematical functions, data points, histograms, heatmaps, and curve fits such as linear regression through thefit command. The primary command for 2D plots is plot, which handles functions and data in rectangular or polar coordinates, while splot is used for 3D surfaces and volumes in Cartesian coordinates. For instance, histograms can be generated using styles like with boxes or with histograms, and heatmaps are created via mechanisms such as pm3d mapping or grid interpolation for scattered data.[19][20]
Specialized plot styles include lines for connecting data points, scatter plots via points or dots, surfaces and contours for 3D representations, candlesticks for financial data, and boxplots for summarizing distributions. Version 6.0 introduced additional styles such as convex hulls to outline data boundaries, masks for selective visualization, advanced smoothing algorithms to reduce noise in curves, and pie charts for proportional data representation. These styles can be mixed within a single plot command, allowing flexible combinations like overlaying lines on boxes.[21][15][22]
Gnuplot provides built-in support for plotting parametric equations, polar plots, and statistical distributions, including the normal (Gaussian) distribution via the norm(x) function. Parametric plots are enabled by setting the mode with set parametric before using plot or splot, while polar plots use set polar to interpret angles. Customization is extensive, with options for axis scaling (linear via default or logarithmic with set logscale), labels (set xlabel), legends (set key), and multi-plot layouts (set multiplot for arranging multiple graphs on one canvas). A simple example is plotting the sine function over a specified range: plot [0:2*pi] sin(x), which generates a 2D curve from x=0 to x=2π.[23][19]
Data Input and Processing
Gnuplot supports multiple data sources for input, including inline data embedded directly in commands, external files in ASCII or binary formats, pipes from external programs, and in-memory arrays introduced in version 5 and enhanced in subsequent releases. Inline data can be provided using the special filename '-', allowing transient datasets to be specified within a plot command followed by data lines terminated by 'e'. For example, the commandplot '-' followed by lines such as 1 2 and 3 4 before e will plot the points (1,2) and (3,4). External files are referenced by name in quotes within plot commands, supporting both whitespace-delimited ASCII text and binary formats with specified structures like array dimensions or records. Pipes enable dynamic input from shell commands, such as plot "< cat data.txt" to stream file contents as if from a file. Arrays, declared as array A[N], provide efficient in-memory storage and manipulation, with version 6 adding support for passing arrays to functions and returning them as results.[24][25]
File formats are primarily delimited text files, where columns are separated by whitespace (spaces or tabs) by default, though customizable via set datafile separator "," for comma-separated values (CSV) or other delimiters. The using clause in plot commands selects and transforms columns, such as plot "data.dat" using 1:2 to map the first column to x-coordinates and the second to y-coordinates, with support for expressions like using 1:($2 * $3). Binary files require explicit format specification, e.g., plot "data.bin" binary array=(100,100) for a 100x100 grid, and gnuplot handles endianness and data types via options like endian or format. To handle headers or unwanted initial lines, commands like skip N or every ::N exclude them; for instance, plot "data.csv" every ::1 skip 1 skips the first line before processing from the second. Comments in files begin with '#' (configurable via set datafile commentschars), and blank lines separate data blocks for multi-dataset files. Missing values are marked with '?' or a custom string set by set datafile missing "NaN", ensuring robust parsing of incomplete datasets.[24][25]
Data processing features include smoothing to reduce noise, statistical summaries via the stats command, and array operations for custom computations. Smoothing applies filters like monotonic cubic splines (smooth mcsplines) or frequency normalization (smooth frequency), transforming raw data before visualization; for example, plot "noisy.dat" using 1:2 smooth csplines interpolates a smooth curve through points. The stats command computes aggregates such as mean, standard deviation, median, and sum for selected columns, storing results in variables like STATS_mean or prefixed names (e.g., stats "data.dat" using 2 name "A" yields A_mean); this is useful for quick analyses without full plotting. Array operations, enhanced in version 6, allow dynamic manipulation, such as array A[10]; do for [i=1:10] { A[i] = i**2 }, enabling computed datasets like quadratic sequences for plotting via plot A. These features prepare data conceptually, focusing on transformation rather than graphical output.[24][25]
Error handling integrates with data input through support for uncertainty representation and model fitting. Error bars are specified via additional columns in the using clause, such as plot "errors.dat" using 1:2:3 with errorbars where the third column provides symmetric y-errors, or asymmetric variants like using 1:2:3:4 with yerrorbars for lower and upper bounds. Gnuplot's fit command performs nonlinear least-squares optimization (using the Marquardt-Levenberg algorithm) to adjust model parameters against data, e.g., defining f(x) = a*x + b and executing fit f(x) "data.dat" using 1:2 via a,b to estimate a and b while accounting for errors if set fit errorvariables is enabled. Fit results include statistics like chi-squared (FIT_WSSR) and degrees of freedom (FIT_NDF), stored for further use, ensuring data-driven model validation. These mechanisms handle imperfect inputs reliably, with errors propagated into the analysis.[24][25]
User Interface and Usage
Command-Line Interface
Gnuplot operates in an interactive command-line mode when launched without specifying input files, allowing users to enter plotting commands directly in a terminal or command prompt on Unix-like systems or Windows. To start an interactive session, the user typesgnuplot at the shell prompt, which initializes the program and displays the gnuplot> prompt, indicating readiness for input.[26] This mode is designed for real-time exploration of data and functions, with commands processed sequentially as they are entered.[27]
The core plotting commands in interactive mode include plot for generating 2D graphs of functions or data sets and splot for 3D surface plots. For example, entering plot sin(x) at the prompt produces a simple sine wave graph, while splot x*y creates a 3D surface. Configuration is handled via the set command, such as set terminal png to specify output to PNG format for subsequent plots. The replot command redraws the existing plot, enabling quick overlays or modifications without re-entering full specifications.[26] These commands support abbreviations for efficiency, like p for plot, provided they remain unambiguous.[28]
Navigation within the interactive session is facilitated by built-in command-line editing and history features, available on supported platforms including Unix, MS-DOS, and OS/2. Users can recall previous commands using up and down arrow keys (or Ctrl-P and Ctrl-N), edit the current line with Emacs-style key bindings like Ctrl-B for backward and Ctrl-F for forward, and extend commands over multiple lines by ending all but the last with a backslash (\). Online help is accessible via help <command>, such as help plot, which displays syntax and options directly in the terminal.[29][30]
Session management allows persistence of work through the save and load commands. The save command writes the current set of user-defined functions, variables, and options to a file, which can later be reloaded with load to restore the state as if the commands were re-entered interactively. To end the session, users issue exit or quit, or send an end-of-file (EOF) signal, such as Ctrl-D on Unix-like systems, which clears the output device before terminating.[24][31] This interactive environment assumes access to a text-based shell and does not require graphical dependencies for basic operation.[1]
Scripting and Automation
Gnuplot supports scripting through plain text files typically saved with a.gp extension, which contain sequences of commands for automated plot generation and data processing. These scripts can be executed non-interactively from the command line using gnuplot script.gp or loaded into an interactive session with the load "script.gp" command, allowing for batch processing of multiple plots or analyses.[25] This approach enables users to create reusable workflows, such as generating reports from datasets without manual intervention each time.[25]
The scripting language includes control structures for conditional logic and iteration, facilitating complex automation. Conditional statements use if (condition) { commands } syntax, supporting else and else if clauses for branching; for example, if (x > 0) { plot x } else { plot -x }.[25] Loops are handled via do for [var=start:end] { commands } for iterating over ranges or lists, such as do for [i=1:10] { plot sin(i*x) } to produce multiple overlaid curves, and while (condition) { commands } for repeated execution until a condition fails, like while (x < 10) { x = x + 1; print x }.[25] User-defined functions are declared with function_name(x) = expression, enabling reusable computations, e.g., f(x) = x**2; plot f(x).[25]
Variables and expressions form the foundation of dynamic scripting, with user-defined variables assigned via name = value, such as a = 5; plot a*sin(x), supporting numeric, string, and complex types.[25] Mathematical expressions follow C-like operators (e.g., +, -, *, /, ** for exponentiation) and built-in functions like sin or exp, while string handling includes concatenation ("A" . "B"), substrings ("ABC"[2:3]), and formatting via sprintf("format", args).[25] For automation, the system command integrates with shell scripts, executing external commands like system("ls -l") or embedding output via backquotes, e.g., set label "Date: date" to incorporate system timestamps into plots.[25]
Practical automation examples include looping to generate plots from multiple files, such as do for [file in "*.dat"] { plot file }, or conditional plotting based on data statistics using stats "data.dat" to check means or variances before deciding on scaling.[25] In version 6.0, enhancements to arrays (declared as array A[3] = [1, 2, 3] with operations like sum(A) or slicing A[1:3]) and named palettes (via set palette named "viridis") support more sophisticated scripts for handling large datasets or customized visualizations.[25] These features allow seamless integration into larger workflows, such as piping data from shell commands for on-the-fly analysis.[25]
Output Options
Terminal Drivers
Gnuplot employs terminal drivers to manage output rendering to specific devices or formats, enabling real-time previews and interactive features where supported. The selection of a terminal is achieved through theset terminal <type> command, which determines the rendering method, available options, and degree of interactivity for the plot display. This choice influences both on-screen visualization during interactive sessions and the overall user experience, as certain terminals support dynamic adjustments like zooming and panning.[32]
Interactive terminals facilitate live plotting with user input capabilities. The X11 terminal is designed for Unix-like systems using the X Window System, automatically activating if the DISPLAY environment variable is set, and supports multiple plot windows via options like set terminal x11 <n> for window number n. The windows terminal provides fast rendering on Microsoft Windows via the Windows GDI, offering interactive controls for plot manipulation. For macOS, the aqua terminal delivers native integration with the system's graphics framework. The wxt terminal, built on the wxWidgets library and utilizing Cairo for drawing, offers cross-platform interactivity across Unix, Windows, and macOS, including widgets for zooming, panning, and maintaining aspect ratios while scaling fonts and line widths dynamically.[33][34][35][36]
Non-interactive terminals prioritize static or embeddable output without real-time user engagement. The dumb terminal generates simple ASCII art plots directly in text environments, configurable with size parameters (e.g., <xsize> <ysize>) and options for line feeds or enhanced text handling. The canvas terminal produces JavaScript code for rendering plots on HTML5 canvas elements, suitable for web integration and supporting mouse tracking, coordinate marking, and grid toggling via browser interactions. The qt terminal, introduced in version 5.0 and now the default interactive terminal as of version 6.0 if Qt5 or Qt6 is detected, provides cross-platform GUI rendering with advanced elements like toolbars and enhanced mouse support for operations such as rotation and selection, further improved in version 6.0 for more responsive interactivity including menu-driven output to PNG, SVG, or PDF.[37][38][4][39]
Version 6.0 introduced additional terminals, including the block terminal for high-resolution text-mode pseudo-graphics using Unicode block or Braille characters, and kittycairo and sixelgd terminals for inline graphics with animation support in compatible terminal emulators.[39]
Terminal configurations allow customization of output characteristics, including canvas dimensions via size <xsize>,<ysize>, font specifications, and support for multiplot layouts, which vary by terminal type but enable tailored rendering (e.g., set terminal wxt size 800,600 font "[Arial](/page/Arial),12"). These options ensure compatibility with diverse display environments while preserving plot integrity. Version-specific enhancements, such as the qt terminal's integration in 5.0 for richer GUI features and refined mouse interactions in 6.0, reflect ongoing improvements to interactive capabilities across platforms.[24][4][25]
Supported File Formats
Gnuplot supports a variety of exportable file formats for plots, enabling users to generate both raster and vector graphics suitable for web display, printing, and further editing in professional software. These formats are selected via theset terminal command, which configures the output driver, followed by set output to direct the plot to a specific file.[40]
Raster formats in gnuplot include PNG, JPEG, GIF, and others, which are ideal for pixel-based images with options for compression, color depth, and transparency. TIFF is not directly supported but can be obtained by converting from PNG or other raster outputs using external tools. The PNG terminal (set terminal png) supports alpha channel transparency, variable compression levels (e.g., via the compress option), and color depths up to 24-bit true color or 8-bit indexed color, making it suitable for web-compatible images that maintain quality when scaled down. JPEG output (set terminal jpeg) allows quality settings from 0 to 100 for compression trade-offs between file size and image fidelity, while GIF (set terminal gif) supports palette-based colors and animation for multi-frame plots.[40]
Vector formats such as PostScript (including EPS and PS), SVG, PDF (via Cairo library), and HPGL provide scalable, resolution-independent output perfect for printing and editing. The PostScript terminal (set terminal postscript) generates EPS or PS files with customizable font embedding and line widths, compatible with tools like Adobe Illustrator for post-processing. SVG output (set terminal svg) creates web-ready vector graphics that support enhanced interactivity features like zoom and pan when viewed in modern browsers.[14] PDF generation uses the pdfcairo terminal (set terminal pdfcairo), leveraging the Cairo library for embedded fonts and hyperlinks, ensuring compatibility with PDF viewers and editors. The HPGL terminal (set terminal hpgl) produces plotter-compatible files for legacy hardware or CAD applications. Version 6.0 added support for WebP format via the webp terminal, suitable for efficient raster images and animations.[39]
Other formats extend gnuplot's versatility for specialized workflows, including LaTeX integration via TikZ/PGF, HTML-compatible MIF, and animated GIFs. The tikz terminal (set terminal tikz) outputs LaTeX code using the PGF/TikZ package, allowing seamless embedding of plots in documents with native font consistency and scalability. The MIF terminal generates FrameMaker Interchange Format files for HTML or document processing, structuring plots within frames for easy import into publishing tools. Animated GIFs are created using the gif terminal with the animate option, compiling multiple plots into a single looping file for dynamic visualizations.
Multi-format support allows flexible batch exporting by combining terminal selection with output redirection, such as set terminal png; set output "plot.png"; plot sin(x); replay; set output "plot.svg"; set terminal svg; replay to generate versions in different formats from the same script. This approach, often paired with the replot command for iterative updates, ensures compatibility across applications like web browsers for raster and vector files or Adobe Illustrator for EPS editing. Terminal preview can guide format selection before final export.
Integrations and Extensions
Graphical Frontends
Gnuplot provides several built-in graphical user interfaces (GUIs) that extend its command-line capabilities with visual elements for enhanced interactivity. The wgnuplot frontend, native to Windows, offers a standalone GUI with a toolbar for common operations, an integrated file browser for data selection, and support for drag-and-drop file loading directly into the plotting window.[25] It enables real-time parameter adjustments through mouse interactions such as panning, zooming via wheel or right-click dragging, and point-and-click editing of plot elements without returning to the command line.[25] wgnuplot supports keeping plot windows open after script execution via the -persist flag and interruption of long-running fits with Ctrl-Break, making it suitable for interactive exploration on Windows platforms.[25] Cross-platform support arrives with the gnuplot/qt terminal, integrated since version 5.4 and leveraging the Qt library for a modern interface. This terminal features a customizable toolbar with buttons for replotting, saving, and copying plots, alongside a status bar displaying mouse coordinates and zoom levels.[25] Users can load data via drag-and-drop, adjust axes in real-time using mouse wheel scaling (default 10% increments), and enable hypertext labels that show pop-ups on hover with clipboard copying on click.[25] Multiple independent plot windows are supported by specifyingset terminal qt <n>, where n denotes the window number, and the interface resizes dynamically while maintaining plot proportions.[25] In version 6.0 and later, gnuplot/qt fully compatibilizes with new features such as pie charts generated via the set style piechart command or arc-based circles, ensuring seamless rendering of enhanced plot styles like sectors and 3D filledcurves.[25]
Third-party frontends further expand gnuplot's accessibility by wrapping its core engine in diverse environments. jgnuplot, a Java-based GUI, provides a platform-independent interface for script editing, data import, and plot previewing, allowing users to execute gnuplot commands visually while supporting batch processing for automated workflows.[41] Similarly, UniGNUPlot offers a Tcl/Tk-driven frontend focused on simplifying interactive plotting with menu-based controls for common tasks like axis configuration and output export, ideal for users preferring lightweight scripting integrations.[42] Web-based options, such as those integrating gnuplot output with Plotly via server-side scripts that convert SVG or data files to interactive JavaScript plots, enable embedding dynamic visualizations in web applications without native installation.[43]
These frontends emphasize user convenience through features like point-and-click plot editing—such as selecting and modifying data points directly—and real-time previews that update on parameter changes, reducing reliance on textual commands.[25] For scientific computing environments, integrations like Eclipse plugins facilitate gnuplot usage within IDEs by automating data export from debuggers (e.g., GDB) and generating plots via scripted pipelines, streamlining visualization during development.[44] However, all such GUIs depend on the underlying gnuplot engine for rendering, inheriting its strengths in precision plotting while potentially requiring version updates for full access to innovations like version 6's pie chart support and enhanced 3D polygons.[25]
Programming Interfaces
Gnuplot provides several mechanisms for integration into programming environments, enabling developers to generate plots programmatically without relying on its standalone interactive mode. These interfaces primarily leverage pipe communication for non-interactive execution, where commands and data are sent to gnuplot via standard input (stdin) and output is captured from standard output (stdout). This approach allows seamless embedding in scripts and applications across various languages, supporting batch processing of data visualizations.[45][46] Pipe-based integration is the foundational method for controlling gnuplot from external programs. Commands can be piped directly to gnuplot for immediate execution, often combined with the-persist flag to maintain output windows or redirected to files using set output. For instance, in a shell environment, data and plotting instructions can be streamed non-interactively: echo "plot sin(x)" | gnuplot -persist. In Python, this is achieved using the subprocess module to invoke gnuplot with piped input, allowing dynamic generation of plots from computed data. Similar piping works in other languages like C or Perl by writing to a process pipe, facilitating real-time visualization of algorithmic outputs without file intermediaries.[45][47][46]
Dedicated libraries and wrappers extend this capability with higher-level abstractions, often handling data serialization and command construction automatically. For C++, the gnuplot-iostream library provides an iostream-based interface, enabling direct plotting of STL containers like vectors via operator overloading on pipes, such as gp << "plot" << std::make_pair(&x, &y) << std::endl;. This wrapper simplifies integration by abstracting the underlying popen mechanism while supporting both inline data and file-based inputs. In Python, the Gnuplot.py module (also known as gnuplot-py) offers an object-oriented interface for plotting NumPy arrays or functions from memory, with methods like g.plot([data](/page/Data)) that internally manage pipe communication and temporary files. Gnuplot 6.0's native array support can be leveraged via pipes for more efficient handling of multidimensional data structures, such as NumPy arrays, in compatible third-party wrappers like gnuplotlib for complex surface or heatmap plots.[48][49][50][51]
Language-specific bindings further broaden accessibility. For Perl, the Chart::Gnuplot module generates plots on the fly by constructing gnuplot scripts from Perl data structures, supporting formats like PNG or SVG without manual pipe handling. Lua bindings, such as lua-gnuplot, enable script-based plotting by translating Lua tables into gnuplot commands executed via external calls, useful for embedded systems or Torch frameworks. Java integration is facilitated by JavaPlot, a pure Java library that wraps gnuplot processes to create plots from Java collections, implementing features like multi-plot layouts through API calls rather than raw process execution. Advanced usage includes JNI for tighter coupling, though pipe-based methods predominate for portability.[52][53][54]
Gnuplot's interfaces are commonly employed in scientific computing environments for dynamic visualizations. In Octave, a MATLAB-compatible system, gnuplot serves as the default plotting backend via one-way pipes, rendering 2D and 3D graphics from Octave arrays with commands like plot(x, y). R users leverage the Rgnuplot package to interface with gnuplot, exporting data frames for high-quality static plots in non-interactive scripts. For interactive workflows, the gnuplot_kernel extends Jupyter notebooks, allowing direct execution of gnuplot commands in cells alongside Python or other languages, ideal for exploratory data analysis with mixed-language notebooks. These integrations highlight gnuplot's role as a versatile engine in tools like Octave for numerical simulations or Jupyter for reproducible research.[55][56][57]
Licensing and Availability
Distribution License
Gnuplot is released under a custom permissive license that grants users the right to use, copy, modify, and distribute the software and its documentation for any purpose, with or without fee, provided that the copyright notice and permission notice are included in all copies.[6] This license, distinct from the GNU General Public License (GPL), imposes no copyleft requirements, allowing integration into proprietary software without obligating the disclosure of derivative works' source code.[6][58] Key terms of the license emphasize source availability for modifications while prohibiting the redistribution of fully modified source code versions; instead, changes must be provided as patch files applied to the official released version.[6] For binary distributions of modified versions, redistributors are required to include the patch files, add identification for the modified version, provide contact information for support, and retain the original authors' contact details.[6] The software is provided "as is" without any express or implied warranty, including but not limited to warranties of merchantability or fitness for a particular purpose, to the extent permitted by applicable law.[6] Attribution to the original authors is maintained through the retention of copyright and permission notices in all distributions and modifications.[6] This licensing model has been in place since gnuplot's inception in 1986 and has undergone minimal updates, reflecting its origins as a freely distributable tool for academic and research visualization.[1][6] The full text of the license is available in the project's Copyright file on its official repository.[6] In comparison to standard open-source norms, gnuplot's license resembles those of the BSD or MIT varieties in its permissiveness, facilitating commercial use, embedding in closed-source applications, and avoidance of viral licensing obligations that propagate to downstream works.[58][6] Redistribution rules permit the inclusion of gnuplot binaries in proprietary software distributions, provided that any modifications adhere to the patch-based disclosure requirements to ensure transparency without restricting the enclosing product's proprietary nature.[6] This approach balances openness for the core tool with flexibility for users and developers in diverse environments.[6]Platforms and Installation
Gnuplot is a portable graphing utility supporting multiple operating systems, including Linux, macOS, Windows, OS/2, VMS, and BSD variants such as FreeBSD.[1] Cross-platform builds are available through source compilation, enabling deployment on various Unix-like systems and legacy environments.[17] The latest stable version, 6.0.3, can be downloaded from the official mirrors on SourceForge, including source tarballs (gnuplot-6.0.3.tar.gz) and platform-specific binaries.[59] Download integrity is verified using provided SHA256 checksums, such as those in gnuplot-6.0.3.tar.gz.sha256.[59]
Installation methods vary by platform, with pre-built packages preferred for ease. On Debian-based Linux distributions like Ubuntu, gnuplot is installed via the Advanced Package Tool (APT) with the command sudo apt install gnuplot, which handles dependencies automatically.[60] For RPM-based systems such as Fedora, the DNF package manager is used similarly (sudo dnf install gnuplot). On macOS, Homebrew users run brew install gnuplot to obtain a binary package with common features enabled, while MacPorts users execute sudo port install gnuplot.[61] Windows installations typically involve downloading the 64-bit executable installer (gp603-win64-mingw.exe) from SourceForge and running it, or using Chocolatey with choco install gnuplot for automated setup.[62] For BSD systems like FreeBSD, the package is added via pkg install gnuplot.[63] On OpenVMS, specialized kits (e.g., version 5.0-2) are installed from VSI repositories on an ODS-5 enabled disk, often requiring X Windows for graphical output.[64]
For custom builds or unsupported platforms, source compilation is recommended using the autotools process: extract the tarball, run ./configure with options to enable features (e.g., --with-qt for the Qt terminal), followed by make and sudo make install.[65] This requires a C/C++ compiler like GCC and may need optional libraries for enhanced output support, such as libgd for PNG images, cairo (with pango) for PDF and SVG formats, and Qt version 5 or later for the interactive Qt terminal.[45] X11 support necessitates libX11 development headers. Pre-built binaries for select platforms, including Windows and some Linux variants, are also available directly from gnuplot.info or SourceForge to bypass compilation.[66]
Common installation issues arise from missing dependencies, leading to unavailable terminals or output formats. For instance, on Debian systems, failure to display X11 terminals can be resolved by installing libx11-dev via sudo apt install libx11-dev before recompiling.[45] Similar library shortages for cairo or Qt can be addressed by installing the respective development packages (e.g., libcairo2-dev, qtbase5-dev) and rerunning the configure step. Always consult the INSTALL file in the source distribution for platform-specific prerequisites.[65]