BIL101 Introduction to Computers and Information Systems - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

BIL101 Introduction to Computers and Information Systems

Description:

BIL101. Introduction to Computers and Information Systems. Turgut Yilmaz ... asin : returns arc sine of its argument. atan : returns arc tangent of its argument ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 15
Provided by: Mur36
Category:

less

Transcript and Presenter's Notes

Title: BIL101 Introduction to Computers and Information Systems


1
BIL101 Introduction to Computers and Information
Systems
A Portable Scientific Visualization Program
GNUPLOT
Turgut Yilmaz Office 244 e-mail
turgut.yilmaz_at_itu.edu.tr www.mkn.itu.edu.tr/yilma
ztur
Presentation file prepared by Murat
Çakan cakanmu_at_itu.edu.tr Modified by T. Yilmaz
(2003)
2
BIL101 Introduction to Computers and Information
Systems
Gnuplot is an interactive function plotting
program. It comes with almost all distributions
of Linux Systems To invoke Gnuplot type
Gnuplot at the command prompt of Linux To end
Gnuplot type quit or exit
3
BIL101 Introduction to Computers and Information
Systems
  • Gnuplot is case sensitive!
  • Any number of command may appear on
  • a line seperated by semicolons()
  • Strings are indicated with quotes
  • Commands may be extended to several lines for
    this you must end each line with a Backslash (\)

4
BIL101 Introduction to Computers and Information
Systems
  • Gnuplot functions
  • abs absolute value of its argument
  • acos returns arc cosine of its argument
  • asin returns arc sine of its argument
  • atan returns arc tangent of its argument
  • cos returns the cosine of its argument
  • cosh returns the hyperbolic cosine of its
    argument
  • exp returns the exponential function of its
    argument
  • log returns the natural logarithm (base e) of
    its argument
  • log10 returns the logarithm (base 10) of its
    argument

5
BIL101 Introduction to Computers and Information
Systems
  • Gnuplot functions(continued)
  • sgn returns 1 if its argument is positive, -1
    if negative and 0 if 0
  • sin returns the sine of its argument
  • sinh returns the hyperbolic sine of its
    argument
  • sqrt returns the square root of its argument
  • tan returns the tangent of its argument
  • tanh returns the hyperbolic tangent of its
    argument

6
BIL101 Introduction to Computers and Information
Systems
Gnuplot operators Symbol Example Explanation
ab exponentiation ab multiplication
/ a/b division ab modulo ab ad
dition - a-b subtraction a
b equality ! a!b inequality
7
BIL101 Introduction to Computers and Information
Systems
Two dimesional plot command is plot Three
dimensional plot command is splot The documents
for GNUPlot is accesible via web site of ITÜ
Informatics Institute
8
BIL101 Introduction to Computers and Information
Systems
EXAMPLES Program I plots the sine function via
the following display output gtplot sin(x)
Default range. Subject to modification
9
BIL101 Introduction to Computers and Information
Systems
gtplot -55 sin(x)
New range -5 5
10
BIL101 Introduction to Computers and Information
Systems
To set the interval between two consecutive ticks
in x-direction to 1 gtset xtics 1 gtplot -55
sin(x)
11
BIL101 Introduction to Computers and Information
Systems
To use no tics at all in x-direction gtset
xtics 0 gtplot -55 sin(x)
12
BIL101 Introduction to Computers and Information
Systems
To plot several functions on the samegraph gtset
xtics 1 set ytics 1 gtplot -55 -22 sin(x),
cos(x), tan(x)
13
BIL101 Introduction to Computers and Information
Systems
How to plot user defined functions of single
variable? Set axis range(s), define function and
use this function in the plot command Example gt
set xrange-1010 gtset yrange-1010 gt
y(x)2x5 gtset grid gtplot y(x)
14
BIL101 Introduction to Computers and Information
Systems
How to plot user defined functions two
variables? Set axis range(s), define function and
use this function in the plot command Example gt
set xrange-1010 gtset yrange-1010 gt
z(x,y)2x3-y2 gtset grid gtsplot z(x,y)
Write a Comment
User Comments (0)
About PowerShow.com