Click here to load reader
View
215
Download
0
Embed Size (px)
gnuplot 4.7
An Interactive Plotting Program
Thomas Williams & Colin Kelley
Version 4.7 organized by: Hans-Bernhard Broker, Ethan A Merritt, and others
Major contributors (alphabetic order):Hans-Bernhard Broker, John Campbell,Robert Cunningham, David Denholm,
Gershon Elber, Roger Fearick,Carsten Grammes, Lucas Hart,
Lars Hecking, Peter Juhasz,Thomas Koenig, David Kotz,Ed Kubaitis, Russell Lang,
Timothee Lecomte, Alexander Lehmann,Alexander Mai, Bastian Markisch,Ethan A Merritt, Petr Mikulk,
Carsten Steger, Shigeharu Takeno,Tom Tkacik, Jos Van der Woude,
James R. Van Zandt, Alex Woo, Johannes ZellnerCopyright c 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Copyright c 2004 - 2011 various authors
Mailing list for comments: [email protected] list for bug reports: [email protected]
Web access (preferred): http://sourceforge.net/projects/gnuplot
This manual was originally prepared by Dick Crawford.
2012 Version 4.7 (cvs)
2 gnuplot 4.7 CONTENTS
Contents
I Gnuplot 16
Copyright 16
Introduction 16
Seeking-assistance 17
New features 18
New syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Local customization of linetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
New plot styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Revised polar axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
New smoothing algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
New time/date handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Statistical summary of data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
New or revised terminal drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Backwards compatibility 20
New smoothing algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
New time/date handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Statistical summary of data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Batch/Interactive Operation 21
Canvas size 21
Command-line-editing 22
Comments 22
Coordinates 22
Datastrings 23
Enhanced text mode 24
Environment 25
Expressions 25
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Elliptic integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
CONTENTS gnuplot 4.7 3
Unary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Ternary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Gnuplot-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
User-defined variables and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Fonts 32
Cairo (pdfcairo, pngcairo, epscairo, wxt terminals) . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Gd (png, gif, jpeg terminals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Postscript (also encapsulated postscript *.eps) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Glossary 33
Linetypes, colors, and styles 33
Colorspec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Background color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Linecolor variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Rgbcolor variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Linestyles vs linetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Mouse input 36
Bind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Bind space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Mouse variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Plotting 38
Start-up (initialization) 39
String constants and string variables 39
Substitution and Command line macros 39
Substitution of system commands in backquotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Substitution of string variables as macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
String variables, macros, and command line substitution . . . . . . . . . . . . . . . . . . . . . . . . 41
Syntax 41
Quote Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Time/Date data 42
II Plotting styles 43
Boxerrorbars 43
4 gnuplot 4.7 CONTENTS
Boxes 44
Boxplot 45
Boxxyerrorbars 45
Candlesticks 46
Circles 47
Ellipses 47
Dots 48
Filledcurves 48
Financebars 49
Fsteps 50
Fillsteps 50
Histeps 50
Histograms 51
Newhistogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Automated iteration over multiple columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Image 54
Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Image failsafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Impulses 55
Labels 55
Lines 55
Linespoints 56
Points 56
Polar 56
Steps 57
Rgbalpha 57
Rgbimage 57
Vectors 57
CONTENTS gnuplot 4.7 5
Xerrorbars 58
Xyerrorbars 58
Yerrorbars 58
Xerrorlines 59
Xyerrorlines 59
Yerrorlines 60
3D (surface) plots 60
2D projection (set view map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
III Commands 61
Cd 61
Call 61
Clear 62
Do 62
Evaluate 63
Exit 63
Fit 63
Adjustable parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Short introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Error estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Statistical overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Practical guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Control variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Multi-branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Starting values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Help 70
History 70
If 70
If-old . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6 gnuplot 4.7 CONTENTS
Iteration 71
Load 71
Lower 72
Pause 72
Plot 73
Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Skip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Endian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Filetype . . . . . . . . . . .