Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.
-
Upload
kerry-jackson -
Category
Documents
-
view
214 -
download
0
Transcript of Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.
![Page 1: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/1.jpg)
Basic Usage of GnuPlot
Hyun Hee Shim Department of Physics Kangwon National University
![Page 2: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/2.jpg)
What is GnuPlot?
GnuPlot is a command-driven interactive function plotting program.
• Introduction
• Operation
1. Plotting of two dimensional functions and data points in many
different style.
2. Plotting of three dimensional data points and surfaces in many
different style.
![Page 3: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/3.jpg)
Starting and Quitting the GnuPlot
• Starting : To start the GunPlot under Unix , just type the command
“gnuplot”.
• Quitting : To exit GnuPlot, you can type either quit, exit or
simply q.
Basic screen of GnuPlot
![Page 4: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/4.jpg)
Menubar in the Gnuplot
File Plot Expressions
On the menu bar, you can use the source wish to select.
![Page 5: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/5.jpg)
Function
General Axis
Chart
3D Style
![Page 6: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/6.jpg)
Plotting function
To start exploring GnuPlot, try the following command.
: The first plot command produces a plot of function.
In the first example, the range of x is not specified, so GnuPlot use its default range of (-10,10).
• Plot Function
Ex) plot cos(x)
![Page 7: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/7.jpg)
Ex) plot [-pi : pi] sin(x**2),cos(exp(x))
The second plot command produces a plot of the functions sin and cos on the same graph, with x in the range (-π, π).
2xxe
In the second example, the phrase [-pi:pi] following plot tells GnuPlot to produce the plot with x in the range This tells GnuPlot to plot both functions on the same plot.
• Plot interval function
![Page 8: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/8.jpg)
Plotting the data
gnuplot> plot “map.dat” u 1:2 t “” w p 3
Represented data
Explanation : Point style using 3 color is pressed w p 3.
: File for map.dat plot using data.
: First column equal to x,second column equal to y. (u 1:2)
![Page 9: Basic Usage of GnuPlot Hyun Hee Shim Department of Physics Kangwon National University.](https://reader036.fdocuments.in/reader036/viewer/2022082713/5697bf851a28abf838c87274/html5/thumbnails/9.jpg)
Summary
• GnuPlot is function plotting program using the command.
• GnuPlot can plot data.