View
0
Download
0
Embed Size (px)
gnuplot 5.5
An Interactive Plotting Program
Thomas Williams & Colin Kelley
Version 5.5 organized by: Ethan A Merritt and many others
Major contributors (alphabetic order): Christoph Bersch, Hans-Bernhard Bröker,
John Campbell, Robert Cunningham, David Denholm, Gershon Elber,
Roger Fearick, Carsten Grammes, Lucas Hart, Lars Hecking, Péter Juhász,
Thomas Koenig, David Kotz, Ed Kubaitis, Russell Lang, Timothée Lecomte,
Alexander Lehmann, Jérôme Lodewyck, Alexander Mai, Bastian Märkisch,
Ethan A Merritt, Petr Mikuĺık, Daniel Sebald, Carsten Steger, Shigeharu Takeno,
Tom Tkacik, Jos Van der Woude, James R. Van Zandt, Alex Woo, Johannes Zellner
Copyright c© 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley Copyright c© 2004 - 2020 various authors
Mailing list for comments: gnuplot-info@lists.sourceforge.net Web site and issue trackers: http://sourceforge.net/projects/gnuplot
This manual was originally prepared by Dick Crawford.
Version 5.5 (development snapshot February 2020)
2 gnuplot 5.5 CONTENTS
Contents
I Gnuplot 21
Copyright 21
Introduction 21
Seeking-assistance 22
New features 23
Development version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
New plot styles and style options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
New commands and command options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Multiple named palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Other new features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Features introduced in version 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Support for 64-bit integer arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Voxel grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
New plot styles and style options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
New data pre-processing filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
New commands and command options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
New terminals and terminal options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Pixmaps as objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Other new features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Features introduced in version 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
New plot styles and style options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
New data pre-processing filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Polar mode improvements and extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Nonlinear coordinates systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
New commands and command options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
New data type "array" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
New terminals and terminal options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Other new features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Features introduced in version 5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Differences between versions 4 and 5 29
Deprecated syntax 29
Demos and Online Examples 30
CONTENTS gnuplot 5.5 3
Batch/Interactive Operation 30
Command line options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Canvas size 31
Command-line-editing 32
Comments 32
Coordinates 32
Datastrings 33
Enhanced text mode 34
Escape sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Environment 35
Expressions 36
Complex arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Elliptic integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Counting and extracting words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Unary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Ternary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Gnuplot-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
User-defined variables and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Fonts 45
Cairo (pdfcairo, pngcairo, epscairo, wxt terminals) . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Gd (png, gif, jpeg, sixel terminals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Postscript (also encapsulated postscript *.eps) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Glossary 46
Inline data and datablocks 47
4 gnuplot 5.5 CONTENTS
Iteration 47
Linetypes, colors, and styles 48
Colorspec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Background color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Linecolor variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Rgbcolor variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Dashtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Linestyles vs linetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Layers 52
Mouse input 52
Bind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Bind space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Mouse variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Persist 54
Plotting 55
Start-up (initialization) 55
String constants, string variables, and string functions 55
Substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
String operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
String functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
String encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Substitution and Command line macros 56
Substitution of system commands in backquotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Substitution of string variables as macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
String variables, macros, and command line substitution . . . . . . . . . . . . . . . . . . . . . . . . 58
Syntax 58
Quote Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Time/Date data 59
II Plotting styles 61
Arrows 61
CONTENTS gnuplot 5.5 5
Bee swarm plots 61
Boxerrorbars 62
Boxes 62
2D boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3D boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63