0% found this document useful (0 votes)
46 views

Robotics 2 Gnuplot: Giorgio Grisetti, Cyrill Stachniss, Kai Arras, Wolfram Burgard

This document introduces Gnuplot, a powerful and free plotting utility that can be used to visualize scientific data. Gnuplot allows plotting data from files with just a few lines of code, supports batch processing of multiple plots, and can output in various formats like EPS, PDF, PNG. It is one of the major plotting standards alongside MATLAB. Examples are provided to demonstrate basic Gnuplot syntax for plotting simple datasets and customizing plots. The document encourages readers to explore more Gnuplot examples and tutorials online to get familiar with its capabilities for scientific work.

Uploaded by

Jino Goju Stark
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Robotics 2 Gnuplot: Giorgio Grisetti, Cyrill Stachniss, Kai Arras, Wolfram Burgard

This document introduces Gnuplot, a powerful and free plotting utility that can be used to visualize scientific data. Gnuplot allows plotting data from files with just a few lines of code, supports batch processing of multiple plots, and can output in various formats like EPS, PDF, PNG. It is one of the major plotting standards alongside MATLAB. Examples are provided to demonstrate basic Gnuplot syntax for plotting simple datasets and customizing plots. The document encourages readers to explore more Gnuplot examples and tutorials online to get familiar with its capabilities for scientific work.

Uploaded by

Jino Goju Stark
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Robotics 2

Gnuplot
Giorgio Grisetti, Cyrill Stachniss,
Kai Arras, Wolfram Burgard
Motivation
 Introduction to the most relevant tools commonly
used in scientific writing
 LaTeX - a general typesetting system
 Gnuplot - a plotting utility to visualize data
Why not Using Excel?
 “I am happy with Excel, why not use it?”

 Excel plots are ugly


 No automatic processing of data files, …
 Excel is clearly suboptimal for scientific working
(reformatting takes ages, no scripting, limited
functionality …)
 By default, Excel outputs raster images
Gnuplot
 Powerful 2D and 3D plotting utility
 Plotting is possible with very few lines of code
 Batch processing (plotting multiple plots in one
run)
 Various output formats (eps, pdf, png, X11, latex,
xfig, …)
 Data can be plotting via stdin/stdout
 Free and available for basically all platforms
 One of the mayor plotting standards
(besides Matlab)
An Gnuplot Example
plot “data3.dat” using 1:2

data3.dat
1 1 0.5 1.5
2 1 0.4 1.4
3 0 0 0
4 1 0 2
5 3 1 4
6 4 2 6
An Gnuplot Example
plot “data3.dat” using 1:2 notitle
An Gnuplot Example
plot “data3.dat” using 1:2 notitle w points ps 5
Running Gnuplot
 Run: gnuplot mygnuplotfile.gnuplot
 It either produces and image or show the result
on the screen (terminal X11)
 Gnuplot can also read commands from stdin
 This is excellent for debugging code
Gnuplot Example
reset
set terminal X11
set title "One- and Two-tau models"
set xrange [0:15]
set yrange [0:1.5]
set xlabel "Time [nS]"
set ylabel "Voltage, normalized“
plot 1-exp(-x/3.8825) title "Single time constant",\
1-(3.44*exp(-x/3.44)-0.44*exp(-x/0.44))/3.0 title "Two time
constants"
Hands on Gnuplot Examples
see examples on the web

 gnuplot points.gnuplot
 gnuplot lines1.gnuplot
 gnuplot lines2.gnuplot
 gnuplot filledcurve.gnuplot
 gnuplot function.gnuplot
 gnuplot errorbars.gnuplot
 gnuplot histogram.gnuplot
 gnuplot boxes.gnuplot
 gnuplot box-error.gnuplot
 gnuplot surface.gnuplot
 gnuplot world.gnuplot
 gnuplot labeling.gnuplot
 perl example.pl | gnuplot
 ...
Gnuplot Summary
 Gnuplot is much more powerful than what is
shown here
 Ones needs to get used to the syntax but it pays
off immediately
 There are a lot of tutorials available online
 See gnuplot demo page:
http://gnuplot.sourceforge.net/demo/
 As well as the “Impossible Gnuplot Plots”:
http://www.phyast.pitt.edu/~zov1/gnuplot/gnuplot.html

Get used to Gnuplot NOW!

You might also like