SlideShare a Scribd company logo
1 of 67
‘ GNUPLOT & ITS APPLICATIONS’
Sabyasachi Ray
Roll no.03 , Part 2
Department of physics
University of North Bengal
 Scientists runs simulations or take
measurements. These data need to be
presented in an appealing and professional
manner.
 Sometimes there are a lot of data. Sometimes
it is difficult to make the interesting features
come out right. Sometimes many plots must
be produced.
 Manually doing plot with indefinitely large no.
of data are very difficult job. These
different necessity of plotting insists people
to develop some way to save time as well
as hard working.
GNUPLOT: a SOLUTION
 There are lots of other plotting tools available
for creating 1D or 2D plots from numerical
data in different operating systems
 Though many plotting tools are available now-
a-days , one of the best advantages of ‘gnuplot’
over (say) MATHEMATICA or MAPLE GRAPHS is
that it is incredibly easy to write scripts to
automatically create graphs for people from
raw data.
What is gnuplot?
 gnuplot is a command-driven interactive function
and data plotting program. It can be used to plot
functions and data points in both two and three
dimensional plots in many different formats.
GNUPLOT : HISTORY
 Software developer:
Original software:
THOMAS WILLIAMS,COLIN KELLEY
gnuplot 2.0 additions:
RUSSELL LANG, DAVID KOTZ, JOHN CAMPBELL
gnuplot 3.0 additions:
GERSHON ELBER,ALEXANDER WOO & MANY
OTHERS
gnuplot 4.0 additions:
HANS-BERNHARD BRӦKER, ETHANA-MERIT AND
OTHERS
GNUPLOT: supporting
operating system
 precompiled executables and source code for
gnuplot is downloadable for
1) windows ,
2) DOS,
3) Unix,
4) Linux.
Gnuplot is preinstalled in most of the LINUX
system
LINUX
 ‘gnuplot’ is a software works in almost every
platform. I do my PROJECT WORK in
FEDORACORE 3 (LINUX) platform. As scientific
world mostly uses the LINUX platform.
WORLD-WIDE LINUX
 The governments of many third world nations
like BRAZIL, SPAIN,CHINA,PERU,PAKISTAN and
INDIA are actively involved in promoting
LINUX and associate open source softwares.
 LINUX has found its way to Cell-Phones,
desktops and office computers.
 the LHC itself is controlled by LINUX
Installing Fedora:requirement
 A pentium-class PC (at least 200 MHz for text mode;
400 MHz Pentium II for GUI)
 64 Mb RAM (for text mode)
 192 Mb RAM (for GUI mode)
Minimum hard-disk space
620Mb for minimum custom install
2.3 Gb for personal desktop
3.0 Gb for workstation
1.1 Gb for server install
A everything install requires at least
6.9Gb
Linux: installation
 I installed fedora core 3 in a desktop.
 There are different steps one should follow while
installing.
 The important thing is the PARTITION of hard drive.
Linux: installation
 I choose …
 DISK PARTITION
 MANUALLY⤶
 /boot=100 Mb
 /swap=996 Mb
 /home=10001 Mb
 / =10001 Mb
 free==1961 Kb
Plotting:What does gnuplot offer?
 Plotting two-dimensional functions and data points in
many different styles (points, lines, error bars)
 Plotting three-dimensional data points and surfaces in
many different styles (contour plot)
 Algebraic computation in integer, float and complex
arithmetic
 User-defined functions
 Support for a large number of operating systems, graphics
file formats and output devices
 Extensive on-line help
 TEX-like text formatting for labels, titles, axes, data
points
 Interactive command line editing and history .
Starting : GNUPLOT
 To start gnuplot in LINUX we have to simply type
gnuplot in the command line of the linux terminal as
follows:
 gnuplot
 This command gives:
Starting : GNUPLOT
G N U P L O T
Version 4.0 patchlevel 0
last modified Thu Apr 15 14:44:22 CEST 2004
System: Linux 2.4.23
Copyright (C) 1986 - 1993, 1998, 2004
Thomas Williams, Colin Kelley and many others
This is gnuplot version 4.0. Please refer to the documentation
for command syntax changes. The old syntax will be accepted
throughout the 4.0 series, but all save files use the new syntax.
Type `help` to access the on-line reference manual.
The gnuplot FAQ is available from
http://www.gnuplot.info/faq/
Send comments and requests for help to
<gnuplot-info@lists.sourceforge.net>
Send bugs, suggestions and mods to
<gnuplot-bugs@lists.sourceforge.net>
Terminal type set to 'x11'
gnuplot>
Starting : GNUPLOT
Now gnuplot is ready to
perform different commands
that it supports
Gnuplot: functions
 abs(x) absolute value of x, |x|
 acos(x) arc-cosine of x
 asin(x) arc-sine of x
 atan(x) arc-tangent of x
 cos(x) cosine of x, x is in radians.
 cosh(x) hyperbolic cosine of x, x is in radians
 erf(x) error function of x
 exp(x) exponential function of x, base e
 inverf(x) inverse error function of x
 invnorm(x) inverse normal distribution of x
Gnuplot: functions
 log(x) log of x, base e
 log10(x) log of x, base 10
 norm(x) normal Gaussian distribution function
 rand(x) pseudo-random number generator
 sgn(x) 1 if x > 0, -1 if x < 0, 0 if x=0
 sin(x) sine of x, x is in radians
 sinh(x) hyperbolic sine of x, x is in radians
 sqrt(x) the square root of x
 tan(x) tangent of x, x is in radians
 tanh(x) hyperbolic tangent of x, x is in radians
 E.T.C.
Gnuplot: as calculator
 gnuplot> print abs({3,4})
 5.0
 gnuplot> print log(100)
 4.60517
 gnuplot> print log10(100)
 2.0
 gnuplot> print rand(100)
 0.13348
Gnuplot: as calculator
 gnuplot> print sqrt(100)
 10.0
 gnuplot> print gamma(4)
 6.0
 gnuplot> print 3!
 6.0
 Like that
Gnuplot: as calculator
gnuplot> print 1/3
0
 How strange!!!
Gnuplot: as calculator
Gnuplot does integer,
and not floating point,
arithmetic on integer
expressions
gnuplot> print 1./3.
0.333333
gnuplot: plotting applications
 the primary commands in Gnuplot:-
 plot -2D
 splot -3D
 replot.
Gnuplot: plotting functions
 To plot functions simply one have to type: plot
[function] at the gnuplot> prompt.
 say plot sin(x) to draw a first figure.
 Say replot sin(x)**2 to add a second plot
 Say plot sin(x),-sin(x) to plot two graphs at once.
 Also one can define external function as
gnuplot> f(x)=3*x**4
gnuplot> plot f(x)
Gnuplot: plotting functions
 gnuplot> plot sin(x)
Gnuplot: plotting functions
gnuplot> replot sin(x)**2
Gnuplot: plotting functions
gnuplot> f(x)=3*x**4
gnuplot> plot f(x)
Gnuplot: plotting functions
 gnuplot> splot sin(x*y/20)
gnuplot: Plotting data
 For example my data file, force.dat , might look like:
 0.000 0 0
 0.001 104 51
 0.002 202 101
 0.003 298 148
 0.0031 290 149
 0.004 289 201
 0.0041 291 209
 0.005 310 250
 0.010 311 260
 0.020 280 240
gnuplot: Plotting data
 One can display plot data by typing:
 gnuplot> plot "force.dat" using 1:2 title 'Column', 
"force.dat" using 1:3 title 'Beam’
 If the data are in multiple data files. In this case
one should plot by using a command like:
 gnuplot> plot "fileA.dat" using 1:2 title 'data A', 
"fileB.dat" using 1:3 title 'data B'
gnuplot: plot command
customization
 Plots may be displayed in one of the styles: lines,
points, linespoints, impulses, dots, steps, fsteps,
histeps, errorbars, xerrorbars, yerrorbars,
xyerrorbars, boxes, boxerrorbars, boxxyerrorbars,
financebars, candlesticks or vector To specify the
line/point style use the plot command as follows:

 gnuplot> plot "force.dat" using 1:2 title 'Column'
with lines,
"force.dat" u 1:3 t 'Beam' w linespoints
gnuplot: PRINTING
 One can create a PostScript file of plot by using
the following :
 gnuplot> set terminal postscript
 gnuplot> set output "my-plot.ps"
 gnuplot> plot sin(x)
gnuplot: Commands to Quit
 exit or quit command terminates gnuplot.
 Once one quit gnuplot, all of setting one made
will be lost.
 To save the current setting, use save command
followed by a file name in which parameters and
functions one defined are stored.
 gnuplot overwrites internal parameters in that
file without any warnings.
gnuplot: Commands to Save
Parameters
 gnuplot> save "savefile.plt"
 the saved file is a usual text file.
 one can edit the contents with a text editor.
 To draw a graph again with this file, we use the
load "savefile.plt" command at the gnuplot
command-line-
 gnuplot> load "savefile.plt"
application: gnuplot
 Now different kind of plotting and fitting that
I made are shown and explained in the next
coming slides.
simple ploting using sin(x)
 gnuplot> set terminal postscript
 gnuplot> set output 'sin.pdf'
 gnuplot> plot sin(x)
simple ploting using sin(x)
 To set the X range 0 to 5, [0:5]
 gnuplot> plot [0:5] sin(x)
simple ploting using sin(x)
 gnuplot> set angle degree
 gnuplot> set xrange[-270:270]
 gnuplot> plot sin(x)
 gnuplot> set xrange [-2*pi:2*pi]
 gnuplot> a=0.5
 gnuplot> plot a*sin(x)
gnuplot: different styles available
 Now say some data file named "output.dat"
contains some nature as shown below.
 gnuplot> plot "output.dat" title ‘style1’ with lines.
gnuplot: different styles available
 gnuplot> plot "output.dat" title ‘style2’ with points
gnuplot: customizing styles
 gnuplot> plot "output.dat" title ‘style3’ with steps.
gnuplot: customizing styles
 gnuplot> plot "output.dat" title ‘style4’ with impulses
gnuplot: plotting of two sets of
data from a single data file
 The taken data file was named ‘ lateral density.txt’
 #lateral density.txt
 gnuplot> set terminal postscript
 gnuplot> set output 'lateral density.pdf'
 gnuplot> set logscale
gnuplot: plotting of two sets of
data from a single data file
 gnuplot> set title 'PLOTTING OF TWO SETS OF
DATA FROM A DATA FILE‘
 gnuplot> set xrange [8:75]
 gnuplot> set yrange [0.1:3.0]
 gnuplot> set xlabel 'CORE DISTANCE(meter)'
 gnuplot> set ylabel 'DENSITY (particle/square meter)'
 gnuplot> plot 'lateral density.txt' u 1:3 title
'experimental density' w p 3,
 > 'lateral density.txt' u 1:2 title 'theoretical density' w p
4
gnuplot: plotting of two sets of
data from a single data file
gnuplot: plotting of two sets of
data from a single data file
 gnuplot> replot 'lateral density.txt' u 1:2 w l title
'theoretical graph‘
gnuplot: plotting of two sets of
data from two different data
files and comparing them
 two data file are ‘absorptionrade’ & ‘absorptionsr’
 gnuplot> set terminal postscript
Terminal type set to 'postscript'
Options are 'landscape noenhanced monochrome blacktext 
dashed dashlength 1.0 linewidth 1.0 defaultplex 
palfuncparam 2000,0.003 
butt "Helvetica" 14'
 gnuplot> unset logscale
 gnuplot> set output 'absorption plot.ps'
 gnuplot> set xlabel 'Corrected thickness (mg/cm^2)'
 gnuplot> set ylabel 'counts/minute'
 gnuplot> set title'BETA ABSORPTION CURVE'
gnuplot: plotting of two sets of
data from two different data
files and comparing them
 gnuplot> plot 'absorptionrade' w p 3,'absorptionsr'
title'comparing two sources'
gnuplot: linear curve fitting
 The data file that I choose for this case is:
 Age.txt
 gnuplot> set output 'age.ps'
 gnuplot> set title 'LINEAR CURVE FITTING FOR
DATA FILE USING GNUPLOT'
 gnuplot> set label 'z=zenith angle' at 1.1 ,1.6
gnuplot: linear curve fitting
 gnuplot> set xrange[1:1.5]
 gnuplot> set yrange[1.25:1.65]
 gnuplot> set xlabel 'sec(z)'
 gnuplot> set ylabel 'SHOWER AGE'
 gnuplot> f(x)=(m*x)+c
 gnuplot> m=1.4;c=-0.13
 gnuplot> fit f(x) 'age.txt' u 1:2 via m,c
 After 4 iterations the fit converged.and it is
shown on the screen
gnuplot: linear curve fitting
 gnuplot> set label 'f(x)=m*x+c,m=0.98,c=o.30' at 1.3,1.5
 gnuplot> plot 'age.txt' u 1:2:3 w yerrorbars title
'f(x)=m*x+c',
 > f(x) title 'fitted curve‘
these commands will produce :
linear curve fitting of more than
one plot in a single graph:
 My data file is ‘test.txt’ that I used in my this
particular plotting:
 gnuplot> set terminal postscript
 gnuplot> set output 'manyplot.ps'
 gnuplot> set title ' PLOTING & LINEAR FITTING OF
MORE THAN ONE DATA SETS AT A TIME'
 gnuplot> set xlabel 'sec(z)'
 gnuplot> set ylabel 'shower age'
 gnuplot> set label 'z is the zenith angle' at 1.1,1.5
 gnuplot> set xrange[1:1.4]
 gnuplot> set yrange [1:1.55]
 gnuplot> f1(x)=a1*x+b1
 gnuplot> a1=-2;b1=3.28
 gnuplot> fit f1(x) 'test.txt' u 1:2 via a1,b1
 the fitting command for 2nd set of data points
are:
 gnuplot> f2(x)=a2*x+b2
 gnuplot> a2=0.067;b2=1.173
 gnuplot> fit f2(x) 'test.txt' u 1:4 via a2,b2
 the fitting command for 3rd set of data points
are:
 gnuplot> f3(x)=a3*x+b3
 gnuplot> a3=2;b3=-1.17
 gnuplot> fit f3(x) 'test.txt' u 1:6 via a3,b3
linear curve fitting of more than
one plot in a single graph:
 gnuplot> plot 'test.txt' u 1:2:3 w yerrorbars title' Fe',
 > f1(x) title 'y=0.31*x+0.95',
 > 'test.txt' u 1:4:5 w yerrorbars title ' Mixed',
 > f2(x) title 'y=0.17*x+1.07',
 > 'test.txt' u 1:6:7 w yerrorbars title ' proton',
 > f3(x) title 'y=.26*x+.83'
 These produce:
non-linear curve fitting
 For non-linear curve fitting I take the data file
'lateral density.txt'
 gnuplot> set output 'nonlinear.ps'
 gnuplot> set logscale
 gnuplot> set xrange [8:75]
 gnuplot> set yrange [0.1:3.0]
 gnuplot> set xlabel 'CORE DISTANCE(meter)'
 gnuplot> set ylabel 'DENSITY (particle/square meter)'
 gnuplot> set title 'NON-LINEAR FITTING (more than
one line)'
 gnuplot> set label 'y=(a+b*x+c*x**2+d*x**3)**3' at 30,1
non-linear curve fitting
 gnuplot> f1(x)=(a1+b1*x+c1*x**2+d1*x**3)**3
 gnuplot> a1=10;b1=20;c1=-4;d1=6;
 gnuplot> fit f1(x) 'lateral density.txt' u 1:2 via a1,b1,c1,d1
 gnuplot> f2(x)=(a2+b2*x+c2*x**2+d2*x**3)**3
 gnuplot> a2=1;b2=20;c2=-4;d2=6
 gnuplot> fit f2(x) 'lateral density.txt' u 1:3 via
a2,b2,c2,d2
non-linear curve fitting
 gnuplot> plot 'lateral density.txt' u 1:2 title 'theoretical' ,
 > f1(x) title 'a=1.77,b=-0.05,c=0.0011,d=-8.39e-6' ,
 > 'lateral density.txt' u 1:3 title 'experimental' ,
 > f2(x) title 'a=1.81,b=-0.06,c=0.001,d=-6.37e-6'
3-DIMENSIONAL PLOT USING
GNUPLOT:
 gnuplot> set output '3d.ps'
 gnuplot> set title 'the function choosen is sin(x*y/20)'
 gnuplot> set xr [-10:10]
 gnuplot> set yr [-10:10]
 gnuplot> set zr [-1:1]
 gnuplot> set xlabel 'x-axis'
 gnuplot> set ylabel 'y-axis'
 gnuplot> set zlabel 'z-axis'
 gnuplot> splot sin(x*y/20)
3-DIMENSIONAL PLOT USING
GNUPLOT:
The advantages
 The results are repeatable. This is very useful if one
needs many similar graphs, or if one potentially needs
to redo graphs with updated data.
 Plots can be produced automatically. Sometimes
plots take a long time, especially if there are much
data to be processed.
 Plots can be produced on a remote supercomputer,
written into a file, and then displayed locally. The data
do not need to be transferred.
 For a quick look at small datasets there are many
tools.
 For serious work gnuplot is one of the best.
Disadvantages
 Gnuplot has a limited set of line and point styles.
 Gnuplot cannot output symbolic equations or
formula and labels in most output formats.
 Gnuplot does a poor job of making contour plots.
 This is very hardworking job to remember all the
commands all time.
CONCLUSSION:
 In gnuplot there are many other integrated
facilities like animation. But due to shortage of
time I can not learn them.
 If I get an opportunity to use gnuplot in
future, this project will surely help me lot.
 More over I used this opportunity to learn little
bit about LINUX that would also help in advanced
studies.
Bibliography
 1> GNUPLOT 4.2 - A Brief Manual and Tutorial
Department of Civil and Environmental Engineering
Edmund T. Pratt School of Engineering
Duke University - Box 90287, Durham, NC 27708-0287
 2> www.gnuplot.info.
 3> G N U P L O T
 Version 4.0
 4> ‘fast track to LINUX, a beginners guide’ –digit February 2009.
 5> perfect Set up- Fedora Core 3 |HowtoForge-Linux Howtos and Tutorials
 www.howtoforge.com/perfect_setup_fedora_core_3
 6> book: BIBLE OF LINUX
 7> http://www.duke.edu/~hpgavin/gnuplot.html.
 8> http://www.cs.uni.edu/Help/gnuplot/
 9> Gnuplot Short Course- Tim Langlais

 10> http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
THANK
YOU

More Related Content

What's hot

CPU vs. GPU presentation
CPU vs. GPU presentationCPU vs. GPU presentation
CPU vs. GPU presentationVishal Singh
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in pythoneShikshak
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commandsSagar Kumar
 
File Management in C
File Management in CFile Management in C
File Management in CPaurav Shah
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux Harish R
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introductionsanthosh833
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programmingsavitamhaske
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python pptPriyanka Pradhan
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on pythonwilliam john
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computingHeman Pathak
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Niraj Bharambe
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesMatt Harrison
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Professor Lili Saghafi
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++Neeru Mittal
 

What's hot (20)

CPU vs. GPU presentation
CPU vs. GPU presentationCPU vs. GPU presentation
CPU vs. GPU presentation
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in python
 
File handling-c
File handling-cFile handling-c
File handling-c
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
File Management in C
File Management in CFile Management in C
File Management in C
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introduction
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
 
Python
PythonPython
Python
 
List in Python
List in PythonList in Python
List in Python
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
 
Functions in Python
Functions in PythonFunctions in Python
Functions in Python
 
Knowledge Representation in AI.pptx
Knowledge Representation in AI.pptxKnowledge Representation in AI.pptx
Knowledge Representation in AI.pptx
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computing
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 

Similar to Project gnuplot

How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanIvan Silva
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabMohan Raj
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and SparkOswald Campesato
 
Python Course Basic
Python Course BasicPython Course Basic
Python Course BasicNaiyan Noor
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:wensheng wei
 
Advance Computer Architecture
Advance Computer ArchitectureAdvance Computer Architecture
Advance Computer ArchitectureVrushali Lanjewar
 
MapReduce: teoria e prática
MapReduce: teoria e práticaMapReduce: teoria e prática
MapReduce: teoria e práticaPET Computação
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Sharath Raj
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guideArulalan T
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018Fabio Janiszevski
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Hermann Hueck
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machineYoussoufou YABRE
 
Linux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovLinux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovPivorak MeetUp
 
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...Zalando adtech lab
 

Similar to Project gnuplot (20)

Gnuplot 2
Gnuplot 2Gnuplot 2
Gnuplot 2
 
Matplotlib
MatplotlibMatplotlib
Matplotlib
 
Cc code cards
Cc code cardsCc code cards
Cc code cards
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by Ivan
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
 
Python Course Basic
Python Course BasicPython Course Basic
Python Course Basic
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
 
Advance Computer Architecture
Advance Computer ArchitectureAdvance Computer Architecture
Advance Computer Architecture
 
MapReduce: teoria e prática
MapReduce: teoria e práticaMapReduce: teoria e prática
MapReduce: teoria e prática
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guide
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine
 
iPython
iPythoniPython
iPython
 
Linux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovLinux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene Pirogov
 
pyton Notes1
pyton Notes1pyton Notes1
pyton Notes1
 
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...
06.09.2017 Computer Science, Machine Learning & Statistiks Meetup - MULTI-GPU...
 
Deep Learning in theano
Deep Learning in theanoDeep Learning in theano
Deep Learning in theano
 

Recently uploaded

Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 

Recently uploaded (20)

Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 

Project gnuplot

  • 1. ‘ GNUPLOT & ITS APPLICATIONS’ Sabyasachi Ray Roll no.03 , Part 2 Department of physics University of North Bengal
  • 2.  Scientists runs simulations or take measurements. These data need to be presented in an appealing and professional manner.  Sometimes there are a lot of data. Sometimes it is difficult to make the interesting features come out right. Sometimes many plots must be produced.  Manually doing plot with indefinitely large no. of data are very difficult job. These different necessity of plotting insists people to develop some way to save time as well as hard working.
  • 3. GNUPLOT: a SOLUTION  There are lots of other plotting tools available for creating 1D or 2D plots from numerical data in different operating systems  Though many plotting tools are available now- a-days , one of the best advantages of ‘gnuplot’ over (say) MATHEMATICA or MAPLE GRAPHS is that it is incredibly easy to write scripts to automatically create graphs for people from raw data.
  • 4. What is gnuplot?  gnuplot is a command-driven interactive function and data plotting program. It can be used to plot functions and data points in both two and three dimensional plots in many different formats.
  • 5. GNUPLOT : HISTORY  Software developer: Original software: THOMAS WILLIAMS,COLIN KELLEY gnuplot 2.0 additions: RUSSELL LANG, DAVID KOTZ, JOHN CAMPBELL gnuplot 3.0 additions: GERSHON ELBER,ALEXANDER WOO & MANY OTHERS gnuplot 4.0 additions: HANS-BERNHARD BRӦKER, ETHANA-MERIT AND OTHERS
  • 6. GNUPLOT: supporting operating system  precompiled executables and source code for gnuplot is downloadable for 1) windows , 2) DOS, 3) Unix, 4) Linux. Gnuplot is preinstalled in most of the LINUX system
  • 7. LINUX  ‘gnuplot’ is a software works in almost every platform. I do my PROJECT WORK in FEDORACORE 3 (LINUX) platform. As scientific world mostly uses the LINUX platform.
  • 8. WORLD-WIDE LINUX  The governments of many third world nations like BRAZIL, SPAIN,CHINA,PERU,PAKISTAN and INDIA are actively involved in promoting LINUX and associate open source softwares.  LINUX has found its way to Cell-Phones, desktops and office computers.  the LHC itself is controlled by LINUX
  • 9. Installing Fedora:requirement  A pentium-class PC (at least 200 MHz for text mode; 400 MHz Pentium II for GUI)  64 Mb RAM (for text mode)  192 Mb RAM (for GUI mode)
  • 10. Minimum hard-disk space 620Mb for minimum custom install 2.3 Gb for personal desktop 3.0 Gb for workstation 1.1 Gb for server install A everything install requires at least 6.9Gb
  • 11. Linux: installation  I installed fedora core 3 in a desktop.  There are different steps one should follow while installing.  The important thing is the PARTITION of hard drive.
  • 12. Linux: installation  I choose …  DISK PARTITION  MANUALLY⤶  /boot=100 Mb  /swap=996 Mb  /home=10001 Mb  / =10001 Mb  free==1961 Kb
  • 13. Plotting:What does gnuplot offer?  Plotting two-dimensional functions and data points in many different styles (points, lines, error bars)  Plotting three-dimensional data points and surfaces in many different styles (contour plot)  Algebraic computation in integer, float and complex arithmetic  User-defined functions  Support for a large number of operating systems, graphics file formats and output devices  Extensive on-line help  TEX-like text formatting for labels, titles, axes, data points  Interactive command line editing and history .
  • 14. Starting : GNUPLOT  To start gnuplot in LINUX we have to simply type gnuplot in the command line of the linux terminal as follows:  gnuplot  This command gives:
  • 15. Starting : GNUPLOT G N U P L O T Version 4.0 patchlevel 0 last modified Thu Apr 15 14:44:22 CEST 2004 System: Linux 2.4.23 Copyright (C) 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley and many others This is gnuplot version 4.0. Please refer to the documentation for command syntax changes. The old syntax will be accepted throughout the 4.0 series, but all save files use the new syntax. Type `help` to access the on-line reference manual. The gnuplot FAQ is available from http://www.gnuplot.info/faq/ Send comments and requests for help to <gnuplot-info@lists.sourceforge.net> Send bugs, suggestions and mods to <gnuplot-bugs@lists.sourceforge.net> Terminal type set to 'x11' gnuplot>
  • 16. Starting : GNUPLOT Now gnuplot is ready to perform different commands that it supports
  • 17. Gnuplot: functions  abs(x) absolute value of x, |x|  acos(x) arc-cosine of x  asin(x) arc-sine of x  atan(x) arc-tangent of x  cos(x) cosine of x, x is in radians.  cosh(x) hyperbolic cosine of x, x is in radians  erf(x) error function of x  exp(x) exponential function of x, base e  inverf(x) inverse error function of x  invnorm(x) inverse normal distribution of x
  • 18. Gnuplot: functions  log(x) log of x, base e  log10(x) log of x, base 10  norm(x) normal Gaussian distribution function  rand(x) pseudo-random number generator  sgn(x) 1 if x > 0, -1 if x < 0, 0 if x=0  sin(x) sine of x, x is in radians  sinh(x) hyperbolic sine of x, x is in radians  sqrt(x) the square root of x  tan(x) tangent of x, x is in radians  tanh(x) hyperbolic tangent of x, x is in radians  E.T.C.
  • 19. Gnuplot: as calculator  gnuplot> print abs({3,4})  5.0  gnuplot> print log(100)  4.60517  gnuplot> print log10(100)  2.0  gnuplot> print rand(100)  0.13348
  • 20. Gnuplot: as calculator  gnuplot> print sqrt(100)  10.0  gnuplot> print gamma(4)  6.0  gnuplot> print 3!  6.0  Like that
  • 21. Gnuplot: as calculator gnuplot> print 1/3 0  How strange!!!
  • 22. Gnuplot: as calculator Gnuplot does integer, and not floating point, arithmetic on integer expressions gnuplot> print 1./3. 0.333333
  • 23. gnuplot: plotting applications  the primary commands in Gnuplot:-  plot -2D  splot -3D  replot.
  • 24. Gnuplot: plotting functions  To plot functions simply one have to type: plot [function] at the gnuplot> prompt.  say plot sin(x) to draw a first figure.  Say replot sin(x)**2 to add a second plot  Say plot sin(x),-sin(x) to plot two graphs at once.  Also one can define external function as gnuplot> f(x)=3*x**4 gnuplot> plot f(x)
  • 25. Gnuplot: plotting functions  gnuplot> plot sin(x)
  • 27. Gnuplot: plotting functions gnuplot> f(x)=3*x**4 gnuplot> plot f(x)
  • 28. Gnuplot: plotting functions  gnuplot> splot sin(x*y/20)
  • 29. gnuplot: Plotting data  For example my data file, force.dat , might look like:  0.000 0 0  0.001 104 51  0.002 202 101  0.003 298 148  0.0031 290 149  0.004 289 201  0.0041 291 209  0.005 310 250  0.010 311 260  0.020 280 240
  • 30. gnuplot: Plotting data  One can display plot data by typing:  gnuplot> plot "force.dat" using 1:2 title 'Column', "force.dat" using 1:3 title 'Beam’  If the data are in multiple data files. In this case one should plot by using a command like:  gnuplot> plot "fileA.dat" using 1:2 title 'data A', "fileB.dat" using 1:3 title 'data B'
  • 31. gnuplot: plot command customization  Plots may be displayed in one of the styles: lines, points, linespoints, impulses, dots, steps, fsteps, histeps, errorbars, xerrorbars, yerrorbars, xyerrorbars, boxes, boxerrorbars, boxxyerrorbars, financebars, candlesticks or vector To specify the line/point style use the plot command as follows:   gnuplot> plot "force.dat" using 1:2 title 'Column' with lines, "force.dat" u 1:3 t 'Beam' w linespoints
  • 32. gnuplot: PRINTING  One can create a PostScript file of plot by using the following :  gnuplot> set terminal postscript  gnuplot> set output "my-plot.ps"  gnuplot> plot sin(x)
  • 33. gnuplot: Commands to Quit  exit or quit command terminates gnuplot.  Once one quit gnuplot, all of setting one made will be lost.  To save the current setting, use save command followed by a file name in which parameters and functions one defined are stored.  gnuplot overwrites internal parameters in that file without any warnings.
  • 34. gnuplot: Commands to Save Parameters  gnuplot> save "savefile.plt"  the saved file is a usual text file.  one can edit the contents with a text editor.  To draw a graph again with this file, we use the load "savefile.plt" command at the gnuplot command-line-  gnuplot> load "savefile.plt"
  • 35. application: gnuplot  Now different kind of plotting and fitting that I made are shown and explained in the next coming slides.
  • 36. simple ploting using sin(x)  gnuplot> set terminal postscript  gnuplot> set output 'sin.pdf'  gnuplot> plot sin(x)
  • 37. simple ploting using sin(x)  To set the X range 0 to 5, [0:5]  gnuplot> plot [0:5] sin(x)
  • 38. simple ploting using sin(x)  gnuplot> set angle degree  gnuplot> set xrange[-270:270]  gnuplot> plot sin(x)
  • 39.  gnuplot> set xrange [-2*pi:2*pi]  gnuplot> a=0.5  gnuplot> plot a*sin(x)
  • 40. gnuplot: different styles available  Now say some data file named "output.dat" contains some nature as shown below.  gnuplot> plot "output.dat" title ‘style1’ with lines.
  • 41. gnuplot: different styles available  gnuplot> plot "output.dat" title ‘style2’ with points
  • 42. gnuplot: customizing styles  gnuplot> plot "output.dat" title ‘style3’ with steps.
  • 43. gnuplot: customizing styles  gnuplot> plot "output.dat" title ‘style4’ with impulses
  • 44. gnuplot: plotting of two sets of data from a single data file  The taken data file was named ‘ lateral density.txt’  #lateral density.txt  gnuplot> set terminal postscript  gnuplot> set output 'lateral density.pdf'  gnuplot> set logscale
  • 45. gnuplot: plotting of two sets of data from a single data file  gnuplot> set title 'PLOTTING OF TWO SETS OF DATA FROM A DATA FILE‘  gnuplot> set xrange [8:75]  gnuplot> set yrange [0.1:3.0]  gnuplot> set xlabel 'CORE DISTANCE(meter)'  gnuplot> set ylabel 'DENSITY (particle/square meter)'  gnuplot> plot 'lateral density.txt' u 1:3 title 'experimental density' w p 3,  > 'lateral density.txt' u 1:2 title 'theoretical density' w p 4
  • 46. gnuplot: plotting of two sets of data from a single data file
  • 47. gnuplot: plotting of two sets of data from a single data file  gnuplot> replot 'lateral density.txt' u 1:2 w l title 'theoretical graph‘
  • 48. gnuplot: plotting of two sets of data from two different data files and comparing them  two data file are ‘absorptionrade’ & ‘absorptionsr’  gnuplot> set terminal postscript Terminal type set to 'postscript' Options are 'landscape noenhanced monochrome blacktext dashed dashlength 1.0 linewidth 1.0 defaultplex palfuncparam 2000,0.003 butt "Helvetica" 14'  gnuplot> unset logscale  gnuplot> set output 'absorption plot.ps'  gnuplot> set xlabel 'Corrected thickness (mg/cm^2)'  gnuplot> set ylabel 'counts/minute'  gnuplot> set title'BETA ABSORPTION CURVE'
  • 49. gnuplot: plotting of two sets of data from two different data files and comparing them  gnuplot> plot 'absorptionrade' w p 3,'absorptionsr' title'comparing two sources'
  • 50. gnuplot: linear curve fitting  The data file that I choose for this case is:  Age.txt  gnuplot> set output 'age.ps'  gnuplot> set title 'LINEAR CURVE FITTING FOR DATA FILE USING GNUPLOT'  gnuplot> set label 'z=zenith angle' at 1.1 ,1.6
  • 51. gnuplot: linear curve fitting  gnuplot> set xrange[1:1.5]  gnuplot> set yrange[1.25:1.65]  gnuplot> set xlabel 'sec(z)'  gnuplot> set ylabel 'SHOWER AGE'  gnuplot> f(x)=(m*x)+c  gnuplot> m=1.4;c=-0.13  gnuplot> fit f(x) 'age.txt' u 1:2 via m,c  After 4 iterations the fit converged.and it is shown on the screen
  • 52. gnuplot: linear curve fitting  gnuplot> set label 'f(x)=m*x+c,m=0.98,c=o.30' at 1.3,1.5  gnuplot> plot 'age.txt' u 1:2:3 w yerrorbars title 'f(x)=m*x+c',  > f(x) title 'fitted curve‘ these commands will produce :
  • 53.
  • 54. linear curve fitting of more than one plot in a single graph:  My data file is ‘test.txt’ that I used in my this particular plotting:  gnuplot> set terminal postscript  gnuplot> set output 'manyplot.ps'  gnuplot> set title ' PLOTING & LINEAR FITTING OF MORE THAN ONE DATA SETS AT A TIME'  gnuplot> set xlabel 'sec(z)'  gnuplot> set ylabel 'shower age'  gnuplot> set label 'z is the zenith angle' at 1.1,1.5  gnuplot> set xrange[1:1.4]  gnuplot> set yrange [1:1.55]
  • 55.  gnuplot> f1(x)=a1*x+b1  gnuplot> a1=-2;b1=3.28  gnuplot> fit f1(x) 'test.txt' u 1:2 via a1,b1  the fitting command for 2nd set of data points are:  gnuplot> f2(x)=a2*x+b2  gnuplot> a2=0.067;b2=1.173  gnuplot> fit f2(x) 'test.txt' u 1:4 via a2,b2  the fitting command for 3rd set of data points are:  gnuplot> f3(x)=a3*x+b3  gnuplot> a3=2;b3=-1.17  gnuplot> fit f3(x) 'test.txt' u 1:6 via a3,b3
  • 56. linear curve fitting of more than one plot in a single graph:  gnuplot> plot 'test.txt' u 1:2:3 w yerrorbars title' Fe',  > f1(x) title 'y=0.31*x+0.95',  > 'test.txt' u 1:4:5 w yerrorbars title ' Mixed',  > f2(x) title 'y=0.17*x+1.07',  > 'test.txt' u 1:6:7 w yerrorbars title ' proton',  > f3(x) title 'y=.26*x+.83'  These produce:
  • 57.
  • 58. non-linear curve fitting  For non-linear curve fitting I take the data file 'lateral density.txt'  gnuplot> set output 'nonlinear.ps'  gnuplot> set logscale  gnuplot> set xrange [8:75]  gnuplot> set yrange [0.1:3.0]  gnuplot> set xlabel 'CORE DISTANCE(meter)'  gnuplot> set ylabel 'DENSITY (particle/square meter)'  gnuplot> set title 'NON-LINEAR FITTING (more than one line)'  gnuplot> set label 'y=(a+b*x+c*x**2+d*x**3)**3' at 30,1
  • 59. non-linear curve fitting  gnuplot> f1(x)=(a1+b1*x+c1*x**2+d1*x**3)**3  gnuplot> a1=10;b1=20;c1=-4;d1=6;  gnuplot> fit f1(x) 'lateral density.txt' u 1:2 via a1,b1,c1,d1  gnuplot> f2(x)=(a2+b2*x+c2*x**2+d2*x**3)**3  gnuplot> a2=1;b2=20;c2=-4;d2=6  gnuplot> fit f2(x) 'lateral density.txt' u 1:3 via a2,b2,c2,d2
  • 60. non-linear curve fitting  gnuplot> plot 'lateral density.txt' u 1:2 title 'theoretical' ,  > f1(x) title 'a=1.77,b=-0.05,c=0.0011,d=-8.39e-6' ,  > 'lateral density.txt' u 1:3 title 'experimental' ,  > f2(x) title 'a=1.81,b=-0.06,c=0.001,d=-6.37e-6'
  • 61. 3-DIMENSIONAL PLOT USING GNUPLOT:  gnuplot> set output '3d.ps'  gnuplot> set title 'the function choosen is sin(x*y/20)'  gnuplot> set xr [-10:10]  gnuplot> set yr [-10:10]  gnuplot> set zr [-1:1]  gnuplot> set xlabel 'x-axis'  gnuplot> set ylabel 'y-axis'  gnuplot> set zlabel 'z-axis'  gnuplot> splot sin(x*y/20)
  • 63. The advantages  The results are repeatable. This is very useful if one needs many similar graphs, or if one potentially needs to redo graphs with updated data.  Plots can be produced automatically. Sometimes plots take a long time, especially if there are much data to be processed.  Plots can be produced on a remote supercomputer, written into a file, and then displayed locally. The data do not need to be transferred.  For a quick look at small datasets there are many tools.  For serious work gnuplot is one of the best.
  • 64. Disadvantages  Gnuplot has a limited set of line and point styles.  Gnuplot cannot output symbolic equations or formula and labels in most output formats.  Gnuplot does a poor job of making contour plots.  This is very hardworking job to remember all the commands all time.
  • 65. CONCLUSSION:  In gnuplot there are many other integrated facilities like animation. But due to shortage of time I can not learn them.  If I get an opportunity to use gnuplot in future, this project will surely help me lot.  More over I used this opportunity to learn little bit about LINUX that would also help in advanced studies.
  • 66. Bibliography  1> GNUPLOT 4.2 - A Brief Manual and Tutorial Department of Civil and Environmental Engineering Edmund T. Pratt School of Engineering Duke University - Box 90287, Durham, NC 27708-0287  2> www.gnuplot.info.  3> G N U P L O T  Version 4.0  4> ‘fast track to LINUX, a beginners guide’ –digit February 2009.  5> perfect Set up- Fedora Core 3 |HowtoForge-Linux Howtos and Tutorials  www.howtoforge.com/perfect_setup_fedora_core_3  6> book: BIBLE OF LINUX  7> http://www.duke.edu/~hpgavin/gnuplot.html.  8> http://www.cs.uni.edu/Help/gnuplot/  9> Gnuplot Short Course- Tim Langlais   10> http://t16web.lanl.gov/Kawano/gnuplot/index-e.html