Learn Gnuplot in an Hour Free and Open Software How to Plot Practically Anything Practically Anyway.

Slides:



Advertisements
Similar presentations
Interaction Design: Visio
Advertisements

Introduction to VistaPHw Charting Function
1 Trieste, April 17 th 2008Lucio Zambon Electronic Graphic Interface for Global Archiving Technology: PHP, MySQL, JavaScript, JPGraph, etc Development.
The GIMP Simple features tutorial By Mary A White.
Understanding Microsoft Excel
MATLAB’s extensive, device-independent plotting capabilities are one of its most powerful features. They make it very easy to plot any data at any time.
REVITALISE Visualization Tools Overview: gnuplot Garrett Love Shodor Education Foundation Durham, NC.
CSE4251 The Unix Programming Environment
1 A Portable Scientific Visualization Program: GnuPlot Asst. Prof. Emin Korkut.
Introduction to SPSS (For SPSS Version 16.0)
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
Carolina Environmental Program UNC Chapel Hill The Analysis Engine – A New Tool for Model Evaluation, Sensitivity and Uncertainty Analysis, and more… Alison.
BINF 634 Fall Lec 11 Visualization1 Plan for Tonight A synopsis of our progress through the course Lecture 11 Visualization in PERL Lab 2 Based.
Gnuplot What is gnuplot? an interactive plotting program.
Create Forms Lesson 5. Objectives Software Orientation The Forms group (below) is located on the Create tab in the Ribbon and can be used to create a.
Gnuplot From command line, type gnuplot G N U P L O T Linux version 3.7 patchlevel 1 last modified Fri Oct 22 18:00:00 BST 1999 Copyright(C) ,
Lesson 1 – Microsoft Excel * The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
1-d Arrays & Plotting.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
Matlab Introduction  Getting Around Matlab  Matrix Operations  Drawing Graphs  Calculating Statistics  (How to read data)
Understanding Microsoft Excel Lesson 1 – Microsoft Excel 2013.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Motion Graphics & Animation.
Advanced Charts Lesson 9. Objectives 1. Create charts by using data from other applications. 2. Modify chart types. 3. Add and modify chart options. 4.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Lab 2 : potting to Matlab Networks.
Introduction to Gnuplot Bob Dowling University Computing Service.
Using GNUPlot on LONI Resources B. Estrade. Objectives ● learn to use many features of gnuplot, including: – simple plotting – 3d plotting – working with.
Editing images using Microsoft Photo Editor and Paint
Understanding Microsoft Excel
Excel Notes Use the handout given.
2.02 Understand Digital Vector Graphics
Introduction to Unix for FreeSurfer Users
Understanding Microsoft Excel
Understanding Microsoft Excel
2.02 Understand Digital Vector Graphics
2.02 Understand Digital Vector Graphics
Spreadsheet – Microsoft Excel 2010
By: T. Khawlah Al-Mutlaq
Microsoft Excel.
Microsoft Access 2007 – Level 2
The View Figure Module The View Figure and Figure modules are for FactSage like Notepad and Word for Windows. Use the View Figure module for simple graphical.
Lecture 25.
Chapter 2 – Introduction to the Visual Studio .NET IDE
EPOSTERBOARDS TEMPLATE
CIS 155 INTRODUCTION TO ACCESS 2002
Enhancing a Document Part 1
Exporting Output Reports to Excel
2.02 Understand Digital Vector Graphics
Application Software Productivity Tools for Educators
Chapter 7 Advanced Form Techniques
Understanding Microsoft Excel
2.02 Understand Digital Vector Graphics
Enhancing a Document Part 1
2.01 Investigate graphic image design.
Application Software Productivity Tools for Educators
Microsoft Excel 101.
InControl R2 Overview Running Reports.
Code is on the Website Outline Comparison of Excel and R
Citation Map Visualizing citation data in the Web of Science
CSCI N207 Data Analysis Using Spreadsheet
HP ALM Defects Module To protect the confidential and proprietary information included in this material, it may not be disclosed or provided to any third.
Instructions for Windows users:
What do you think will be the values of y?
Stata Basic Course Lab 2.
Understanding Microsoft Excel
Workshop 3: Charts.
Barcode Software and Designing Process of 2D Barcode- Aztec Font
2.02 Understand Digital Vector Graphics
2.02 Understand Digital Vector Graphics
2.02 Understand Digital Vector Graphics
Biostatistics Lecture (5).
Presentation transcript:

Learn Gnuplot in an Hour Free and Open Software How to Plot Practically Anything Practically Anyway

What is Gnuplot? ● Plotting Software – command-line based ● Unix / Linux ● Mac OS X ● Windows Dialog Box Data Functions

Why Gnuplot? ● Fun – Had To Be Fun ● All Common Graphic Formats - jpg, gif, png (and some not so common) ● Readily Available ● Reliable ● Free – Now and Forever ● No Initial Learning Curve

The Most Common Commands ● Set (unset reset) ● Plot (replot splot) ● Call ● Help ● History ● Load Usage 90 % ● Print ● Save ● Show ● Test

What We're Going to Do (1 of 2) Interactive Mode ● Plot Functions ● Line Width and Line Type ● Set ● X- and Y- Labels / Ranges ● Grid ● Title ● Key (legend) ● Save and Load Files (by the book) ● Save Files (by hook-or-by-crook) History Command

What We're Going to Do (2 of 2) 'Scriptive' Mode ● Plot Data ● Data Format / Separators ● Line Width and Line Type (revisited) ● Test Command ● Terminals ● Export Graphs

Interactive Mode (1 of 10) Begin at the Beginning ● Open a Terminal ● cd Desktop ● gnuplot G N U P L O T Version 4.4 patchlevel 0 last modified March 2010 System: Linux generic Copyright (C) , 1998, 2004, Thomas Williams, Colin Kelley and many others gnuplot home: faq, bugs, etc: type "help seeking- assistance" immediate help: type "help" plot window: hit 'h' Terminal type set to 'x11' gnuplot> Version 4.4 ?

Interactive Mode (2 of 10) Your first plot! ● gnuplot> plot sin(x)

Interactive Mode (3 of 10) Modify the Ranges: x and y ● gnuplot> plot [-6:6] [-1.25:1.25] sin(x)

Interactive Mode (4 of 10) Modify the Grid and Title ● gnuplot>set grid ● gnuplot>set title 'Sinusoids' ● gnuplot> replot

Interactive Mode (5 of 10) Modify the X-Label and Y-Label ● gnuplot>set xlabel 'X-Values' ● gnuplot>set ylabel 'Amplitude' ● gnuplot> replot

Interactive Mode (6 of 10) Add a 2 nd Function ● gnuplot>plot [-6:6] [-1.25:1.25] sin(x), cos(x) Don't forget the comma.

Interactive Mode (7 of 10) Modify the Plot Command - Width ● gnuplot>plot [-6:6] [-1.25:1.25] sin(x) linewidth 3, cos(x) linewidth 3 Change the width of the lines.

Interactive Mode (8 of 10) Modify the Plot Command - Color ● gnuplot>plot [-6:6] [-1.25:1.25] sin(x) linetype 1 linewidth 3, cos(x) linetype 3 linewidth 3

Interactive Mode (9 of 10) Modify the Plot Command - Key ● gnuplot>plot [-6:6] [-1.25:1.25] sin(x) linetype 1 linewidth 3 title "Sin", cos(x) linetype 3 linewidth 3 title "Cos"

Interactive Mode (1 of 2) Save and Load –.gp files (.plt Windows) ● gnuplot> save 'temp.gp' ● gnuplot > load 'temp.gp' ● Open 'temp.gp' In gedit – (OMG) Save your work. Load and run your work. ● gnuplot> show all Details Galore!.

Interactive Mode (2 of 2) The History Command ● gnuplot> history quiet What happened? set grid set xlabel "X-Values" set ylabel "Amplitude" set title "Sinusoids" plot [0:6.28] [-1.6:1.6] sin(x) with lines linewidth 4 title "Sin", cos(x) with lines linewidth 4 title "Cos" history quiet Copy and paste into gedit. Remove unwanted lines. Save as 'filename.gp' ● gnuplot> history

● Plot Functions ● Line Width and Line Type ● Set ● X- and Y- Labels / Ranges ● Grid ● Title ● Key (legend) ● Save and Load Files (by the book) ● Save Files (History command) Interactive Mode (summary)

Scriptive Mode (1 of 9) View the Data ● In gedit open the Sinusoids.dat file # Sinusoids.dat contains white-space separated data etc.

Scriptive Mode (2 of 9) View the gnuplot file ● In gedit open the SinusoidsOne.gp file # SinusoidsOne.gp calls the white-space separated data file set grid # No data separator is necessary in this file. set title "With White-Space Data File" Plot [ ] [-1.75:1.25] "Sinusoids.dat" using 1:2 title "Sin" Calls data file Refers to columns 1 and 2

Scriptive Mode (3 of 9) Run the gnuplot file “scriptively” ● Open a terminal ● cd Desktop ● gnuplot -persist 'SinusoidsOne.gp'

Scriptive Mode (4 of 9) Modify the gnuplot file to include Lines, Points, Linepoints ● In gedit remark-out the first plot command and run with Points ● In gedit remark-out the first plot command and run with Lines ● In gedit remark-out the first plot command and run with Linespoints

Scriptive Mode (5 of 9) View the CSV Data ● In gedit open the Sinusoids.cvs file # Sinusoids.dat contains comma-separated data -3.14,0, ,-0.1, ,-0.2, ,-0.3, ,-0.39, ,-0.48, ,-0.57, ,-0.65,-0.76 etc.

Scriptive Mode (6 of 9) View the gnuplot file ● In gedit open the SinusoidsTwo.gp file # SinusoidsTwo.gp calls the CSV separated data file set grid set datafile separator "," # To accommodate the commas in the data file. set title "With CSV Data File" Plot [ ] [-1.75:1.25] "Sinusoids.csv" using 1:2 title "Sin” Calls data file Refers to columns 1 and 2

Scriptive Mode (7 of 9) Modify the gnuplot file to include Lines, Points, Linepoints ● In gedit remark-out the first plot command and run with either Points, Lines or Linespoints

Scriptive Mode (8 of 9) Add a 2 nd and 3 rd Function ● In gedit open SinusoidsThree.gp ● gnuplot -persist 'SinusoidsThree.gp' ● Review plot command in file Note type and size of curves: Lines, Points and a combination.

Scriptive Mode (9 of 9) Review of SinusoidsThree.gp # SinusoidsThree.gp uses a mathematical formula – 'data transformation' # And used "lines" for the Sin, "Points" for Cos and "Linespoint" for the Difference. set grid set title "Notice!! Sin in Lines \nCos in Points \n Difference in Linespoints." Plot [ ] [-1.75:1.75] "Sinusoids.dat" using 1:2 with lines linetype 1 title "Sin", \ "Sinusoids.dat" using 1:3 with points pointsize 2 linetype 3 title "Cos", \ "Sinusoids.dat" using 1:($2 -$3) with linespoints linewidth 2 linetype 6 title "Sin - Cos" # Note difference: Lines, Points and Linespoints # Note different Line and Point Sizes # Remember can change x-range for better view of Points and Lines # Note also the formula: using 1:($2-$3)

Test Command Reviewing Color and Linetype ● In gnuplot type gnuplot>test ● Open Test.GIF by double clicking on it ● Compare them

Terminals (1 of 2) ● In gnuplot type: gnuplot>show terminal ● In gnuplot type: gnuplot>set terminal gif ● In gnuplot type: gnuplot>show terminal ● In gnuplot type: gnuplot>set terminal x11 ● Some Terminals: gif, png, jpg, svg, ps (re: LaTeX) Set terminal back to original setting

Terminals (2 of 2) GIF Example ● In gedit open SinusoidsGIF.gp ● Review SinusoidsGIF.gp ● gnuplot SinusoidsGIF.gp SinusoidsGIF.gp includes: set terminal gif set output

● Plot Data ● Data Format / Separators ● Line Width and Line Type (revisited) ● Test Command ● Terminals ● Export Graphs Interactive Mode (summary)

What's Ahead Some Topics Not Covered ● Abbreviations ● Animation ● Arrows and Labels ● Colors (4 other methods) ● Fonts ● Data Smoothing ● Help ● Macros ● Missing Data ● Multi-plots ● Numerical Formats ● Polar Coordinates ● Redirection ● Statistics ● Size and Ratio ● Time Series

Websites for Follow-up ● Gnuplot Home Page ● Gnuplot Demo Pages ● Demo of Demo Pages copy, paste and run Demo_4.4/histograms in gnuplot copy, paste and run Demo_4.4/control models in gnuplot (adjust x-range 0 to 10 and y-range 0 to 1.8) copy, paste and run Demo_4.4/finance in gnuplot

Additional Websites, etc. ● Gnuplot Newsgroup comp.graphics.apps.gnuplot ● Gnuplot mailing list ● More Advanced gnuplot info ● gnuplot_QuickReference.pdf

The End ! Thank You