~ubuntu-branches/ubuntu/intrepid/plplot/intrepid

« back to all changes in this revision

Viewing changes to examples/f95/x05f.f90

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2006-11-04 10:19:34 UTC
  • mfrom: (2.1.8 edgy)
  • Revision ID: james.westby@ubuntu.com-20061104101934-mlirvdg4gpwi6i5q
Tags: 5.6.1-10
* Orphaning the package
* debian/control: Changed the maintainer to the Debian QA Group

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!      $Id: x05f.f90,v 1.1 2006/05/16 20:24:12 airwin Exp $
 
2
!      Draws a histogram from sample data
 
3
!
 
4
!      Copyright (C) 2004  Alan W. Irwin
 
5
!
 
6
!      This file is part of PLplot.
 
7
!
 
8
!      PLplot is free software; you can redistribute it and/or modify
 
9
!      it under the terms of the GNU General Library Public License as
 
10
!      published by the Free Software Foundation; either version 2 of the
 
11
!      License, or (at your option) any later version.
 
12
!
 
13
!      PLplot is distributed in the hope that it will be useful,
 
14
!      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
!      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
!      GNU Library General Public License for more details.
 
17
!
 
18
!      You should have received a copy of the GNU Library General Public
 
19
!      License along with PLplot; if not, write to the Free Software
 
20
!      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
21
 
 
22
      use plplot, PI => PL_PI
 
23
      implicit none
 
24
 
 
25
      integer i
 
26
      integer NPTS
 
27
      parameter ( NPTS = 2047 )
 
28
      real(kind=plflt) data(NPTS), delta
 
29
!      Process command-line arguments
 
30
      call plparseopts(PL_PARSE_FULL)
 
31
 
 
32
!      Initialize plplot
 
33
      call plinit()
 
34
!      Fill up data points
 
35
 
 
36
      delta = 2.0_plflt * PI / dble (NPTS)
 
37
      do i=1,NPTS
 
38
        data(i)=sin(delta*dble (i-1))
 
39
      enddo
 
40
 
 
41
      call plcol0(1)
 
42
      call plhist(data, -1.1_plflt, 1.1_plflt, 44, 0)
 
43
      call plcol0(2)
 
44
      call pllab('#frValue','#frFrequency', &
 
45
        '#frPLplot Example 5 - Probability function of Oscillator')
 
46
 
 
47
      call plend
 
48
      end