CSE4251 The Unix Programming Environment

Slides:



Advertisements
Similar presentations
Creating Section 508 Compliant Excel Documents ASPA Web Communications and New Media Division.
Advertisements

Lab # 03- SS Basic Graphic Commands. Lab Objectives: To understand M-files principle. To plot multiple plots on a single graph. To use different parameters.
Introduction to Engineering MATLAB – 11 Plotting - 4 Agenda Multiple curves Multiple plot.
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
PowerPoint Enhancements CMCE 1155 Prof. N Anderson.
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.
Microsoft Excel 2010 Chapter 7
MATLAB ME1107 Y Yan Reference: MATLAB for Engineers by Holly Moore (Pearson Prentice Hall)
This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation. All.
MATLAB - Lecture 22A Two Dimensional Plots / Chapter 5 Topics Covered:
First-Year Engineering Program 1 Autumn 2009 Graphing with Microsoft Excel Lecture 11 Engineering H191 Engineering Fundamentals and Laboratory.
REVITALISE Visualization Tools Overview: gnuplot Garrett Love Shodor Education Foundation Durham, NC.
BIL101, Introduction to Computers and Information Systems Chapter 12 A Portable Scientific Visualization Program: GnuPlot Prepared by Metin Demiralp Istanbul.
1 A Portable Scientific Visualization Program: GnuPlot Asst. Prof. Emin Korkut.
How To Make Graphs in Microsoft Excel Outline Making Bar Graphs Making Scatter Plots – 1 series Making Scatter Plots – Multiple Series.
Graphing in Excel X-Y Scatter Plot SCI 110 CCC Skills Training.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Instructor: Professor Cora Martinez, PhD Department of Civil and Environmental Engineering Florida International University.
1 Word Lesson 4 Working with Graphic Objects Microsoft Office 2010 Fundamentals Story / Walls.
GRAPHICS Graphics is one of the places where the computing world has not yet agreed on standard, and so instead there are a dozen standards, including.
Chapter 5 Review: Plotting Introduction to MATLAB 7 Engineering 161.
ENG College of Engineering Engineering Education Innovation Center 1 2D Plots 1 in MATLAB Topics Covered: 1.Plotting basic 2-D plots The plot()
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Chapter 14. Copyright 2003, Paradigm Publishing Inc. CHAPTER 14 BACKNEXTEND 14-2 LINKS TO OBJECTIVES Add Borders with Borders Button Add Borders with.
LECTURE -9 CREATING A CHART IN MICROSOFT EXCEL. CHARTS Picture representation of data used Easy understanding Comparison of data Checking trends in data.
A Picture Is Worth A Thousand Words. DAY 7: EXCEL CHAPTER 4 Tazin Afrin September 10,
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.
COMP 116: Introduction to Scientific Programming Lecture 5: Plotting, Scripts and publishing.
An Introduction to Office  Office XP and Office 2007 look very different  This introduction should: ◦ Introduce you to some of the basic changes.
Excel chapter 4.
Assignment: Descriptive stats and Graphing using Excel 2010.
Introduction to MATLAB ENGR 1181 MATLAB 1. Opening MATLAB  Students, please open MATLAB now.  CLICK on the shortcut icon → Alternatively, select… start/All.
McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating.
Lesson 2 – Vocabulary and Notes 1.  Know the names, functions and locations of items on the opening screen 2.
Introduction to Programming Workshop 6 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
How to Make a Graph “Bar” Graph Edition MS Step 1. Construct a generic table including your raw data that you want to be graphed.
DAY 6: MICROSOFT EXCEL – CHAPTER 3 Sravanthi Lakkimsetty September 2, 2015.
 The ribbon is the primary form of navigation in the Microsoft Office 2007 system.  There are seven Tabs on the Ribbon, more (contextual) tabs will.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Excel 2007 Lab 2 Charting Worksheet Data.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.
CRSD Technology Training Tony Judice. Quick Access Toolbar – can be modifiedSave as… allows you to save the file to a different location and also as an.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
EXCEL GRAPHING *Basic Graphing Steps* by A.B. -NNHS.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Prepared by the Academic Faculty Members of IT. Tables Creating Tables. Merging Cells. Splitting Cells. Sorting Tables. Performing Calculations.
Spreadsheet Basics Computer Technology What is a spreadsheet? Spreadsheets are: –Applications that track, analyze, and chart numeric information –Used.
Cell Column Drawing Toolbar Formatting Toolbar Formula Bar Help Box Menu Bar Name Box Rows Standard Toolbar Title Bar Worksheet.
 Graphs are the best way to visually represent relationships between two variables.  Y-AXIS (VERTICAL)  for our purposes this will always be distance.
Word 2010 Headers and Footers You can make your document look professional and polished by utilizing headers and footers. The header is a section of the.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Lab 2 : potting to Matlab Networks.
Groups of cells labeled with letters that go up and down (vertical)
EXPLORING THE WINDOWS SECTION PART 1 MOAC Lesson 1.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Desktop Publishing Lesson 3 — Formatting Pages. Lesson 3 – Formatting Pages2 Objectives  Set up pages.  Set guides.  Use master pages.  Insert page.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Instructions for using this template. Remember this is Jeopardy, so where I have written “Answer” this is the prompt the students will see, and where.
Learn Gnuplot in an Hour Free and Open Software How to Plot Practically Anything Practically Anyway.
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.
Excel Tutorial 8 Developing an Excel Application
Run-time and off-line visualization support
Computer Application in Engineering Design
Inserting and Working with Images
Data Visualizer.
Two-Dimensional Plots
MatLab – 2D Plots 2 MATLAB has many built-in functions and commands to create various types of plots. Instructor notes: We start with an example of some.
Welcome To Microsoft Word 2016
Presentation transcript:

CSE4251 The Unix Programming Environment Lecture 13 gnuplot

What is Gnuplot A portable command-line driven graphing utility can output most of the picture formats eps/pdf/tex: good for writing academic pictures now added html, javascript: display data on web Can use interactive command and script file script is good to automate the task!

Interactive plot launch gnuplot: $ gnuplot $ gnuplot gnuplot> gnuplot> plot sin(x)

set plot range set xrange [0:5] # define x range set yrange [0:10] # define y range $ gnuplot gnuplot> gnuplot> plot sin(x) gnuplot > set xrange [0:5] gnuplot > replot

plot from script Save plot commands in file, and run gnuplot: $ gnuplot mycmds.plt Output disappears quickly; use pause to see the result, e.g.: plot sin(x) pause -1 "Hit any key to continue“

commonly used commands help topic #get help about a topic replot #repeat last plot command clear #remove objects in the canvas set OPTION [VALUE] #specify plot options set xrange [0:5] #set the horizontal axis range set multiplot #several plots on the same figure show [all] # show (all) the settings plot #primary command for drawing 2 D figures. plot sin(x) plot ‘datafilename’ using 2:3 with linespoints linetype 1 pointtype 2 title ‘MyFigure’ plot ‘datafilename’ u 2:3 w lp lt 1 pt 2 t ‘MyFigure’ #same meaning as above splot #drawing 3D figures.

save plot to a file Define terminal type and file name set terminal png #set terminal to png type #allow creating png format picture set output ‘output.png’ #specify the name of the output file #figure will be saved to the file #instead of be displayed on the screen

plot functions built-in functions define your own function sin, cos, exp, log, log10, sqrt, norm, abs, etc. define your own function +, - , * , / , etc.

plot functions Examples gnuplot> f(x)=5*x*2+1 gnuplot> plot f(x)

plot functions Examples gnuplot> plot 3*x+5*sin(x)

plot functions Examples gnuplot> splot sin(x)+sin(y)

add text to plot set title “A Figure” #set the title of the figure set xlabel “time” #set the x-axis label as time set label 1 “This is a label1” #specify the name of a label set label 1 at graph 0,0 #specify location of label 1, using graph coordinate #0,0 is bottom left and 1,1 is top right set label 2 “This is label2” at 3.14, 0 #place the label at a particular x-y coordinate

add shape to plot gnuplot> set object 1 rect from 0,0 to 1,4 gnuplot> plot [-5:5] x, -3+sin(x*5)/x lt 3 lw 3

plot data file datafile plot script # using 1:2 $ cat plotdata.txt 3.0 .98 3 4 5.3 .97 5 23 2.7 .8 2 18 5.1 .95 4 15 4.0 .7 4 17 4.4 .84 5 20 5.1 .94 3 13 4.5 .89 5 9 5.7 .94 5 1 datafile="./plotdata.txt" set terminal png set output "points.png" plot datafile using 1:2 with points pause -1 "Hit any key to continue” # using 1:2 # use the 1st and 2nd columns # with points # use points to plot data

plot data file result

plot data file plot with connected points datafile="./plotdata.txt" set terminal png set output “linespoints.png" plot datafile using 1:2 with linespoints pause -1 "Hit any key to continue”

plot data file result

plot data file plot with all three columns datafile="./plotdata.txt" set terminal png set output “linespoints.png" splot datafile using 1:2:3 with linespoints pause -1 "Hit any key to continue”

plot data file result

multiplot plot in the same figure plot f1(x), f2(x), ... Multiplot: plot in multiple subfigures set multiplot layout <rows>, <cols> unset multiplot

multiplot example gnuplot> set multiplot layout 1,2 multiplot> plot sin(x) multiplot> plot cos(x) multiplot> unset multiplot

References Find the demos , tutorials and documents at http://www.gnuplot.info/ Visualize your data with gnuplot http://www.ibm.com/developerworks/linux/library/l-gnuplot/ Display data on webpages http://www.ibm.com/developerworks/aix/library/au-gnuplot/index.html

Labs Lab 4 DUE: 11:59pm, Tuesday, April 14, 2015 http://web.cse.ohio-state.edu/~zhengm/teaching/cse4251sp15/CSE4251%20Lab%204.htm Lab 5 DUE: 11:59pm, Tuesday, April 28, 2015 (Late submission will not be accepted ) http://web.cse.ohio-state.edu/~zhengm/teaching/cse4251sp15/CSE4251%20Lab%205.htm