Gnuplot 5.2 an Interactive Plotting Program Thomas Williams & Colin Kelley

Total Page:16

File Type:pdf, Size:1020Kb

Gnuplot 5.2 an Interactive Plotting Program Thomas Williams & Colin Kelley gnuplot 5.2 An Interactive Plotting Program Thomas Williams & Colin Kelley Version 5.2 organized by: Ethan A Merritt and many others Major contributors (alphabetic order): Christoph Bersch, 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, J´er^omeLodewyck, Alexander Mai, Bastian M¨arkisch, Ethan A Merritt, Petr Mikul´ı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 - 2019 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. Version 5.2.6 (January 2019) 2 gnuplot 5.2 CONTENTS Contents I Gnuplot 18 Copyright 18 Introduction 18 Seeking-assistance 19 New features 20 Features introduced in version 5.2.................................... 20 New plot styles and style options.................................. 20 New data pre-processing filters................................... 20 Polar mode improvements and extensions............................. 20 Nonlinear coordinates systems................................... 20 New commands and command options............................... 21 New data type "array" ....................................... 21 New terminals and terminal options................................ 21 Other new features.......................................... 21 Features introduced in version 5.0.................................... 22 Differences from version 4 22 Deprecated syntax 23 Demos and Online Examples 24 Batch/Interactive Operation 24 Canvas size 24 Command-line-editing 25 Comments 25 Coordinates 25 Datastrings 26 Enhanced text mode 27 Environment 28 Expressions 28 Complex arithmetic............................................ 29 Constants.................................................. 29 Functions.................................................. 29 CONTENTS gnuplot 5.23 Elliptic integrals........................................... 31 Random number generator..................................... 32 Value................................................. 32 Counting and extracting words................................... 32 Operators.................................................. 32 Unary................................................. 32 Binary................................................. 33 Ternary................................................ 34 Summation................................................. 34 Gnuplot-defined variables......................................... 34 User-defined variables and functions................................... 35 Arrays.................................................... 36 Fonts 36 Cairo (pdfcairo, pngcairo, epscairo, wxt terminals)........................... 37 Gd (png, gif, jpeg, sixel terminals).................................... 37 Postscript (also encapsulated postscript *.eps)............................. 37 Glossary 38 Inline data and datablocks 38 Iteration 39 Linetypes, colors, and styles 40 Colorspec.................................................. 40 Background color........................................... 41 Linecolor variable.......................................... 41 Rgbcolor variable.......................................... 41 Dashtype.................................................. 42 Linestyles vs linetypes........................................... 42 Layers 43 Mouse input 43 Bind..................................................... 43 Bind space.............................................. 44 Mouse variables............................................... 45 Persist 45 Plotting 45 Start-up (initialization) 46 String constants and string variables 46 4 gnuplot 5.2 CONTENTS Substitution and Command line macros 47 Substitution of system commands in backquotes............................ 47 Substitution of string variables as macros................................ 47 String variables, macros, and command line substitution........................ 48 Syntax 48 Quote Marks................................................ 49 Time/Date data 49 II Plotting styles 51 Boxerrorbars 51 Boxes 51 Boxplot 52 Boxxyerror 53 Candlesticks 54 Circles 55 Ellipses 55 Dots 56 Filledcurves 56 Fill properties................................................ 57 Financebars 57 Fsteps 58 Fillsteps 58 Histeps 58 Histograms 58 Newhistogram................................................ 60 Automated iteration over multiple columns............................... 61 Image 61 Transparency................................................ 62 Image pixels................................................. 63 Impulses 63 CONTENTS gnuplot 5.25 Labels 63 Lines 64 Linespoints 64 Parallelaxes 65 Points 65 Steps 65 Rgbalpha 66 Rgbimage 66 Vectors 66 Xerrorbars 66 Xyerrorbars 67 Yerrorbars 67 Xerrorlines 68 Xyerrorlines 68 Yerrorlines 68 Zerrorfill 69 3D plots 69 Surface plots................................................ 69 2D projection (set view map)....................................... 70 Polar plots 70 Bee swarm plots 70 Fence plots 70 III Commands 71 Break 71 Cd 71 Call 71 Example................................................... 72 6 gnuplot 5.2 CONTENTS Old-style.................................................. 72 Clear 73 Continue 73 Do 73 Evaluate 73 Exit 74 Fit 74 Adjustable parameters........................................... 76 Short introduction............................................. 77 Error estimates............................................... 78 Statistical overview......................................... 78 Practical guidelines......................................... 79 Control................................................... 79 Control variables........................................... 79 Environment variables........................................ 80 Multi-branch................................................ 80 Starting values............................................... 81 Tips..................................................... 81 Help 82 History 82 If 82 If-old..................................................... 83 For 83 Import 83 Load 84 Lower 84 Pause 84 Plot 85 Axes..................................................... 86 Binary.................................................... 86 General................................................ 87 Array................................................. 87 Record................................................ 87 CONTENTS gnuplot 5.27 Skip.................................................. 87 Format................................................ 88 Endian................................................ 88 Filetype................................................ 88 Avs............................................. 88 Edf............................................. 88 Png............................................. 88 Keywords............................................... 89 Scan............................................. 89 Transpose.......................................... 89 Dx, dy, dz.......................................... 89 Flipx, flipy, flipz...................................... 89 Origin........................................... 89 Center............................................ 89 Rotate............................................ 89 Perpendicular........................................ 90 Data..................................................... 90 Bins.................................................. 91 Every................................................. 92 Example datafile........................................... 92 Index................................................. 93 Skip.................................................. 94 Smooth................................................ 94 Acsplines.......................................... 94 Bezier............................................ 94 Bins............................................. 95 Csplines........................................... 95 Mcsplines.......................................... 95 Sbezier........................................... 95 Unique........................................... 95 Unwrap........................................... 95 Frequency.......................................... 95 Fnormal........................................... 95 Cumulative......................................... 95 Cnormal........................................... 95 Kdensity.......................................... 96 Special-filenames........................................... 96 Piped-data.............................................. 97 Thru................................................. 97 Using................................................. 97 Using examples....................................... 98 Pseudocolumns....................................... 99 8 gnuplot 5.2 CONTENTS Xticlabels.......................................... 99 X2ticlabels......................................... 99 Yticlabels.......................................... 100 Y2ticlabels......................................... 100 Zticlabels.......................................... 100 Volatile................................................ 100 Errorbars.................................................
Recommended publications
  • VLC User Guide
    VLC user guide Henri Fallon Alexis de Lattre Johan Bilien Anil Daoud Mathieu Gautier Clément Stenac VLC user guide by Henri Fallon, Alexis de Lattre, Johan Bilien, Anil Daoud, Mathieu Gautier, and Clément Stenac Copyright © 2002-2004 the VideoLAN project This document is the complete user guide of VLC. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The text of the license can be found in the appendix. GNU General Public License. Table of Contents 1. Introduction.........................................................................................................................................................................1 What is the VideoLAN project ?.....................................................................................................................................1 What is a codec ?............................................................................................................................................................3 How can I use VideoLAN ?............................................................................................................................................3 Command line usage.......................................................................................................................................................4 2. Modules and options for VLC...........................................................................................................................................8
    [Show full text]
  • A Quick Guide to Gnuplot
    A Quick Guide to Gnuplot Andrea Mignone Physics Department, University of Torino AA 2020-2021 What is Gnuplot ? • Gnuplot is a free, command-driven, interactive, function and data plotting program, providing a relatively simple environment to make simple 2D plots (e.g. f(x) or f(x,y)); • It is available for all platforms, including Linux, Mac and Windows (http://www.gnuplot.info) • To start gnuplot from the terminal, simply type > gnuplot • To produce a simple plot, e.g. f(x) = sin(x) and f(x) = cos(x)^2 gnuplot> plot sin(x) gnuplot> replot (cos(x))**2 # Add another plot • By default, gnuplot assumes that the independent, or "dummy", variable for the plot command is "x” (or “t” in parametric mode). Mathematical Functions • In general, any mathematical expression accepted by C, FORTRAN, Pascal, or BASIC may be plotted. The precedence of operators is determined by the specifications of the C programming language. • Gnuplot supports the same operators of the C programming language, except that most operators accept integer, real, and complex arguments. • Exponentiation is done through the ** operator (as in FORTRAN) Using set/unset • The set/unset commands can be used to controls many features, including axis range and type, title, fonts, etc… • Here are some examples: Command Description set xrange[0:2*pi] Limit the x-axis range from 0 to 2*pi, set ylabel “f(x)” Sets the label on the y-axis (same as “set xlabel”) set title “My Plot” Sets the plot title set log y Set logarithmic scale on the y-axis (same as “set log x”) unset log y Disable log scale on the y-axis set key bottom left Position the legend in the bottom left part of the plot set xlabel font ",18" Change font size for the x-axis label (same as “set ylabel”) set tic font ",18" Change the major (labelled) tics font size on all axes.
    [Show full text]
  • Python Data Plotting and Visualisation Extravaganza 1 Introduction
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by The Python Papers Anthology The Python Papers Monograph, Vol. 1 (2009) 1 Available online at http://ojs.pythonpapers.org/index.php/tppm Python Data Plotting and Visualisation Extravaganza Guy K. Kloss Computer Science Institute of Information & Mathematical Sciences Massey University at Albany, Auckland, New Zealand [email protected] This paper tries to dive into certain aspects of graphical visualisation of data. Specically it focuses on the plotting of (multi-dimensional) data us- ing 2D and 3D tools, which can update plots at run-time of an application producing or acquiring new or updated data during its run time. Other visual- isation tools for example for graph visualisation, post computation rendering and interactive visual data exploration are intentionally left out. Keywords: Linear regression; vector eld; ane transformation; NumPy. 1 Introduction Many applications produce data. Data by itself is often not too helpful. To generate knowledge out of data, a user usually has to digest the information contained within the data. Many people have the tendency to extract patterns from information much more easily when the data is visualised. So data that can be visualised in some way can be much more accessible for the purpose of understanding. This paper focuses on the aspect of data plotting for these purposes. Data stored in some more or less structured form can be analysed in multiple ways. One aspect of this is post-analysis, which can often be organised in an interactive exploration fashion. One may for example import the data into a spreadsheet or otherwise suitable software tool which allows to present the data in various ways.
    [Show full text]
  • Sage Tutorial (Pdf)
    Sage Tutorial Release 9.4 The Sage Development Team Aug 24, 2021 CONTENTS 1 Introduction 3 1.1 Installation................................................4 1.2 Ways to Use Sage.............................................4 1.3 Longterm Goals for Sage.........................................5 2 A Guided Tour 7 2.1 Assignment, Equality, and Arithmetic..................................7 2.2 Getting Help...............................................9 2.3 Functions, Indentation, and Counting.................................. 10 2.4 Basic Algebra and Calculus....................................... 14 2.5 Plotting.................................................. 20 2.6 Some Common Issues with Functions.................................. 23 2.7 Basic Rings................................................ 26 2.8 Linear Algebra.............................................. 28 2.9 Polynomials............................................... 32 2.10 Parents, Conversion and Coercion.................................... 36 2.11 Finite Groups, Abelian Groups...................................... 42 2.12 Number Theory............................................. 43 2.13 Some More Advanced Mathematics................................... 46 3 The Interactive Shell 55 3.1 Your Sage Session............................................ 55 3.2 Logging Input and Output........................................ 57 3.3 Paste Ignores Prompts.......................................... 58 3.4 Timing Commands............................................ 58 3.5 Other IPython
    [Show full text]
  • Gnuplot Documentation and Sources
    gnuplot 5.0 An Interactive Plotting Program Thomas Williams & Colin Kelley Version 5.0 organized by: Ethan A Merritt and many others Major contributors (alphabetic order): Christoph Bersch, 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, J´er^omeLodewyck, 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 - 2017 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. Version 5.0.7 (August 2017) 2 gnuplot 5.0 CONTENTS Contents I Gnuplot 17 Copyright 17 Introduction 17 Seeking-assistance 18 New features in version 5 19 New commands............................................... 20 Changes in version 5 20 Deprecated syntax 21 Demos and Online Examples 21 Batch/Interactive Operation 21 Canvas size 22 Command-line-editing 22 Comments 23 Coordinates 23 Datastrings 24 Enhanced text mode 24 Environment 25 Expressions 26 Functions.................................................. 27 Elliptic integrals..........................................
    [Show full text]
  • Libcaca Reference Manual 0.99.Beta1
    libcaca Reference Manual 0.99.beta1 Generated by Doxygen 1.4.6 Sun Apr 23 00:15:09 2006 CONTENTS 1 Contents 1 libcaca Documentation 1 2 libcaca Module Documentation 2 3 libcaca Data Structure Documentation 31 4 libcaca File Documentation 32 5 libcaca Page Documentation 41 1 libcaca Documentation 1.1 Introduction libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals. It is not unlike the famous AAlib library. libcaca can use almost any virtual terminal to work, thus it should work on all Unix systems (including Mac OS X) using either the slang library or the ncurses library, on DOS using the conio library, and on Windows systems using either slang or ncurses (through Cygwin emulation) or conio. There is also a native X11 driver, and an OpenGL driver (through freeglut) that does not require a text terminal. For machines without a screen, the raw driver can be used to send the output to another machine, using for instance cacaserver. libcaca is free software, released under the Do What The Fuck You Want To Public License. This ensures that no one, not even the libcaca developers, will ever have anything to say about what you do with the software. It used to be licensed under the GNU Lesser General Public License, but that was not free enough. 1.2 Developer’s documentation libcaca relies on a low-level, device independent library, called libcucul. libcucul can be used alone as a simple ASCII and/or Unicode compositing canvas.
    [Show full text]
  • The GNU General Public License (GPL) Does Govern All Other Use of the Material That Constitutes the Autoconf Macro
    Notice About this document The following copyright statements and licenses apply to software components that are distributed with various versions of the StorageGRID PreGRID Environment products. Your product does not necessarily use all the software components referred to below. Where required, source code is published at the following location: ftp://ftp.netapp.com/frm-ntap/opensource/ 215-10078_A0_ur001-Copyright 2015 NetApp, Inc. All rights reserved. 1 Notice Copyrights and licenses The following component is subject to the BSD 1.0 • Free BSD - 44_lite BSD 1.0 Copyright (c) 1982, 1986, 1990, 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. • All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. • Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    [Show full text]
  • Snap.Py SNAP for Python
    An Introduction to Snap.py SNAP for Python Author: Rok Sosic Created: Sep 26, 2013 Content Introduction to Snap.py Tutorial Plotting Q&A What is SNAP? Stanford Network Analysis Project (SNAP) General purpose, high performance system for analysis and manipulation of large networks Scales to massive networks with hundreds of millions of nodes, and billions of edges Manipulates large networks, calculates structural properties, generates graphs, and supports attributes on nodes and edges Software is C++ based Web site at http://snap.stanford.edu What is Snap.py? Snap.py: SNAP for Python Provides SNAP functionality in Python C++ Good - fast program execution Downside - complex language, needs compilation Python Downside – slow program execution Good – simple language, interactive use Snap.py Good – fast program execution Good – simple language, interactive use Web site at http://snap.stanford.edu/snap/snap.py.html Snap.py Documentation Check out Snap.py at: http://snap.stanford.edu/snap/snap.py.html Packages for Mac OS X, Windows, Linux Quick Introduction and Tutorial SNAP documentation (snap.stanford.edu) User Reference Manual Top level graph classes TUNGraph, TNGraph, TNEANet Namespace TSnap Developer resources Developer Reference Manual GitHub repository SNAP C++ Programming Guide Snap.py Installation Download the Snap.py package for your platform: http://snap.stanford.edu/snap/snap.py.html Packages for Mac OS X, Windows, Linux (CentOS) 64-bit only – OS, Python Mac OS X, 10.7.5 or later Windows, install
    [Show full text]
  • Using Gretl for Principles of Econometrics, 4Th Edition Version 1.0411
    Using gretl for Principles of Econometrics, 4th Edition Version 1.0411 Lee C. Adkins Professor of Economics Oklahoma State University April 7, 2014 1Visit http://www.LearnEconometrics.com/gretl.html for the latest version of this book. Also, check the errata (page 459) for changes since the last update. License Using gretl for Principles of Econometrics, 4th edition. Copyright c 2011 Lee C. Adkins. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see AppendixF for details). i Preface The previous edition of this manual was about using the software package called gretl to do various econometric tasks required in a typical two course undergraduate or masters level econo- metrics sequence. This version tries to do the same, but several enhancements have been made that will interest those teaching more advanced courses. I have come to appreciate the power and usefulness of gretl's powerful scripting language, now called hansl. Hansl is powerful enough to do some serious computing, but simple enough for novices to learn. In this version of the book, you will find more information about writing functions and using loops to obtain basic results. The programs have been generalized in many instances so that they could be adapted for other uses if desired. As I learn more about hansl specifically and programming in general, I will no doubt revise some of the code contained here. Stay tuned for further developments. As with the last edition, the book is written specifically to be used with a particular textbook, Principles of Econometrics, 4th edition (POE4 ) by Hill, Griffiths, and Lim.
    [Show full text]
  • Gretl Manual
    Gretl Manual Gnu Regression, Econometrics and Time-series Library Allin Cottrell Department of Economics Wake Forest University August, 2005 Gretl Manual: Gnu Regression, Econometrics and Time-series Library by Allin Cottrell Copyright © 2001–2005 Allin Cottrell Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). iii Table of Contents 1. Introduction........................................................................................................................................... 1 Features at a glance ......................................................................................................................... 1 Acknowledgements .......................................................................................................................... 1 Installing the programs................................................................................................................... 2 2. Getting started ...................................................................................................................................... 4 Let’s run a regression ...................................................................................................................... 4 Estimation output............................................................................................................................. 6 The
    [Show full text]
  • Introduction to the GNU Octave
    Session 3. INTRODUCTION TO GNU OCTAVE 1 Objectives 1. Provide an overview of the GNU Octave Programming Language. 2. Promote the methodology of using Octave in data analysis and graphics. 3. Demonstrate how to manipulate and visualize ocean currents data in Octave. 2 Outcomes After taking this session, you should be able to: 1. Identify the location to download and install GNU Octave, 2. Write Octave’s syntax and semantics, 3. Develop a greater conceptual understanding of data analysis and graphics using Octave, and 4. Build skills in manipulating ocean currents data through hands-on exercises. 3 Session Outline 1. Getting Octave 2. Installing Octave on Ubuntu 3. Running Octave 4. Octave Basics 5. Octave Data Types 6. Importing Data 7. Exporting Data 8. Using Functions in Octave 9. Using Octave Packages 10.Base Graphics 4 What is GNU Octave 1. GNU Octave (mostly MATLAB® compatible) is a free software tool distributed under the terms of the GNU General Public License. 2. It runs on GNU/Linux, macOS, BSD (Berkeley Software Distribution), and Windows. 3. It is interactive and may also be used as batch- oriented language. 4. It has a large, coherent, and integrated collection of tools for data analysis and graphics. 5 Steps to Install Octave on Ubuntu 1. sudo apt-get upgrade 2. sudo apt-get update 3. sudo apt-get install octave 4. sudo apt-get install liboctave-dev 6 Running/Exiting Octave 1. By default, Octave is started with the shell command ‘octave’, or, 2. Type ‘octave --no-gui’ at the shell command to start octave without GUI.
    [Show full text]
  • Open Source Used in JVDI for Windows Release 12.7
    Open Source Used In JVDI for Windows Release 12.7 Cisco Systems, Inc. www.cisco.com Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco website at www.cisco.com/go/offices. Text Part Number: 78EE117C99-206127523 Open Source Used In JVDI for Windows Release 12.7 1 This document contains licenses and notices for open source software used in this product. With respect to the free/open source software listed in this document, if you have any questions or wish to receive a copy of any source code to which you may be entitled under the applicable free/open source license(s) (such as the GNU Lesser/General Public License), please contact us at [email protected]. In your requests please include the following reference number 78EE117C99-206127523 Contents 1.1 7-Zip 18.05 1.1.1 Available under license 1.2 boost 1.52.0 1.2.1 Notifications 1.2.2 Available under license 1.3 BOOST C++ Library 1.65.1 1.3.1 Available under license 1.4 Expat 2.2.0 :2.2.0 1.4.1 Available under license 1.5 FreeType 2.1.4 1.5.1 Available under license 1.6 glib 2.27.1 1.6.1 Available under license 1.7 grpc 1.20.1 1.7.1 Available under license 1.8 gstreamer 0.10.35.1 1.8.1 Available under license 1.9 gstreamer-plugins-bad 0.10.22.1 1.9.1 Available under license 1.10 gstreamer-plugins-base 0.10.35.1 1.10.1 Available under license 1.11 gstreamer-plugins-good 0.10.30.1 1.11.1 Available under license 1.12 icu4c 56.1 1.12.1 Available under license 1.13 jansson 2.7 Open Source Used In JVDI for Windows
    [Show full text]