Gnuplot 4.6 an Interactive Plotting Program Thomas Williams & Colin Kelley
Total Page:16
File Type:pdf, Size:1020Kb
gnuplot 4.6 An Interactive Plotting Program Thomas Williams & Colin Kelley Version 4.6 organized by: Hans-Bernhard Br¨oker, Ethan A Merritt, and others Major contributors (alphabetic order): Hans-Bernhard Br¨oker, John Campbell, Robert Cunningham, David Denholm, Gershon Elber, Roger Fearick, Carsten Grammes, Lucas Hart, Lars Hecking, P´eterJuh´asz, Thomas Koenig, David Kotz, Ed Kubaitis, Russell Lang, Timoth´eeLecomte, Alexander Lehmann, Alexander Mai, Bastian M¨arkisch, Ethan A Merritt, Petr Mikul´ık, 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 - 2014 various authors Mailing list for comments: [email protected] Mailing list for bug reports: [email protected] Web access (preferred): http://sourceforge.net/projects/gnuplot This manual was originally prepared by Dick Crawford. 2014 Version 4.6.6 2 gnuplot 4.6 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 Batch/Interactive Operation 20 Canvas size 21 Command-line-editing 21 Comments 22 Coordinates 22 Datastrings 23 Enhanced text mode 23 Environment 24 Expressions 25 Functions.................................................. 26 Elliptic integrals........................................... 27 Random number generator..................................... 27 Value................................................. 28 Operators.................................................. 28 Unary................................................. 28 Binary................................................. 28 Ternary................................................ 29 CONTENTS gnuplot 4.63 Summation................................................. 30 Gnuplot-defined variables......................................... 30 User-defined variables and functions................................... 30 Fonts 31 Cairo (pdfcairo, pngcairo, epscairo, wxt terminals)........................... 31 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........................................... 35 Mouse input 36 Bind..................................................... 36 Bind space.............................................. 37 Mouse variables............................................... 37 Persist 38 Plotting 38 Start-up (initialization) 38 String constants and string variables 39 Substitution and Command line macros 39 Substitution of system commands in backquotes............................ 39 Substitution of string variables as macros................................ 40 String variables, macros, and command line substitution........................ 40 Syntax 41 Quote Marks................................................ 41 Time/Date data 42 II Plotting styles 43 Boxerrorbars 43 Boxes 44 4 gnuplot 4.6 CONTENTS 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 Xerrorbars 58 CONTENTS gnuplot 4.65 Xyerrorbars 58 Yerrorbars 58 Xerrorlines 59 Xyerrorlines 59 Yerrorlines 60 3D (surface) plots 60 2D projection (set view map)....................................... 60 III Commands 60 Cd 61 Call 61 Clear 62 Do 62 Evaluate 62 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 Iteration 71 6 gnuplot 4.6 CONTENTS 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................................................ 76 Avs............................................. 76 Edf............................................. 76 Png............................................. 76 Keywords............................................... 76 Scan............................................. 77 Transpose.......................................... 77 Dx, dy, dz.......................................... 77 Flipx, flipy, flipz...................................... 77 Origin........................................... 77 Center............................................ 77 Rotate............................................ 77 Perpendicular........................................ 77 Data..................................................... 78 Every................................................. 79 Example datafile........................................... 80 Index................................................. 80 Skip.................................................. 81 Smooth................................................ 81 Acsplines.......................................... 82 Bezier............................................ 82 Csplines........................................... 82 Mcsplines.......................................... 82 Sbezier........................................... 82 Sbezier........................................... 82 Unique........................................... 82 Unwrap........................................... 82 Frequency.......................................... 82 CONTENTS gnuplot 4.67 Cumulative......................................... 82 Cnormal........................................... 83 Kdensity.......................................... 83 Special-filenames........................................... 83 Thru................................................. 84 Using................................................. 85 Using examples....................................... 86 Pseudocolumns....................................... 86 Xticlabels.......................................... 87 X2ticlabels......................................... 87 Yticlabels.......................................... 87 Y2ticlabels......................................... 87 Zticlabels.......................................... 87 Volatile................................................ 87 Errorbars.................................................. 87 Errorlines.................................................. 88 Functions.................................................. 88 Parametric................................................. 89 Ranges.................................................... 89 Iteration................................................... 90 Title..................................................... 91 With..................................................... 91 Print 94 Pwd 94 Quit 94 Raise 94 Refresh 94 Replot 95 Reread 95 Reset 96 Save 96 Set-show 97 Angles.................................................... 97 Arrow.................................................... 97 Autoscale.................................................. 99 Parametric mode........................................... 100 8 gnuplot 4.6 CONTENTS Polar mode.............................................. 100 Bars..................................................... 101 Bind..................................................... 101 Bmargin................................................... 101 Border...................................................