This file is indexed.

/usr/share/doc/libplplot11/examples/f77/x01f.f is in libplplot-dev 5.9.9-2ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
c      $Id: x01f.fm4 11680 2011-03-27 17:57:51Z airwin $
c      Simple line plot and multiple windows demo.
c
c      Copyright (C) 2004  Alan W. Irwin
c
c      This file is part of PLplot.
c
c      PLplot is free software; you can redistribute it and/or modify
c      it under the terms of the GNU Library General Public License as
c      published by the Free Software Foundation; either version 2 of the
c      License, or (at your option) any later version.
c
c      PLplot is distributed in the hope that it will be useful,
c      but WITHOUT ANY WARRANTY; without even the implied warranty of
c      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c      GNU Library General Public License for more details.
c
c      You should have received a copy of the GNU Library General Public
c      License along with PLplot; if not, write to the Free Software
c      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

      implicit none
      real*8  x(101), y(101)
      real*8  xs(6), ys(6)
      real*8  xscale, yscale, xoff, yoff
      common /plotdat/ x, y, xs, ys, xscale, yscale, xoff, yoff
      character*80 version
      integer digmax
      include 'plplot_parameters.h'
c      some fortran compilers demand typing of intrinsic lnblnk, and
c      although this is not demanded on g77 it also works there.
      integer lnblnk
      
c      Process command-line arguments
      call plparseopts(PL_PARSE_FULL)

c      Print plplot version
      call plgver(version)
      write (*,'(a,a)') 'PLplot library version: ',
     &  version(:lnblnk(version))

c      Initialize plplot
c      Divide page into 2x2 plots
      call plstar(2,2)

c      Set up the data
c      Original case

      xscale = 6.d0
      yscale = 1.d0
      xoff = 0.d0
      yoff = 0.d0

c      Do a plot

      call plot1()

c      Set up the data

      xscale = 1.d0
      yscale = 0.0014d0
      yoff = 0.0185d0

c      Do a plot

      digmax = 5
      call plsyax(digmax,  0)
      call plot1()

      call plot2()
      call plot3()
c      Don't forget to call PLEND to finish off!

      call plend()
      end
c======================================================================

      subroutine plot1()
      implicit none

      real*8 x(101), y(101)
      real*8 xs(6), ys(6)
      real*8  xscale, yscale, xoff, yoff,
     &  xmin, xmax, ymin, ymax
      integer i
      common /plotdat/ x, y, xs, ys, xscale, yscale, xoff, yoff

      do i = 1, 60
        x(i) = xoff + xscale * dble(i)/60.0d0
        y(i) = yoff + yscale * x(i)**2
      enddo

      xmin = x(1)
      xmax = x(60)
      ymin = y(1)
      ymax = y(60)

      do i = 1, 6
        xs(i) = x((i-1)*10+4)
        ys(i) = y((i-1)*10+4)
      enddo

c      Set up the viewport and window using PLENV. The range in X is
c      0.0 to 6.0, and the range in Y is 0.0 to 30.0. The axes are
c      scaled separately (just = 0), and we just draw a labelled
c      box (axis = 0).

      call plcol0(1)
      call plenv( xmin, xmax, ymin, ymax, 0, 0 )
      call plcol0(2)
      call pllab( '(x)', '(y)', '#frPLplot Example 1 - y=x#u2' )

c      Plot the data points

      call plcol0(4)
      call plpoin( 6, xs, ys, 9 )

c      Draw the line through the data

      call plcol0(3)
      call plline( 60, x, y )
      end

c======================================================================

      subroutine plot2()
      real*8  x(101), y(101)
      real*8  xs(6), ys(6)
      real*8  xscale, yscale, xoff, yoff
      integer i
      common /plotdat/ x, y, xs, ys, xscale, yscale, xoff, yoff

c======================================================================
c
c      Set up the viewport and window using PLENV. The range in X is
c      -2.0 to 10.0, and the range in Y is -0.4 to 2.0. The axes are
c      scaled separately (just = 0), and we draw a box with axes
c      (axis = 1).

      call plcol0(1)
      call plenv(-2.0d0, 10.0d0, -0.4d0, 1.2d0, 0, 1 )
      call plcol0(2)
      call pllab( '(x)', 'sin(x)/x',
     &            '#frPLplot Example 1 - Sinc Function' )

c      Fill up the arrays

      do i = 1, 100
        x(i) = (i-20.0d0)/6.0d0
        y(i) = 1.0d0
        if (x(i) .ne. 0.0d0) y(i) = sin(x(i)) / x(i)
      enddo
c      Draw the line

      call plcol0(3)
      call plwid(2)
      call plline( 100, x, y )
      call plwid(1)
      end

c======================================================================
      subroutine plot3()
c
c      For the final graph we wish to override the default tick intervals,
c      and so do not use_ PLENV

      include 'plplot_parameters.h'
      real*8  x(101), y(101)
      real*8  xs(6), ys(6)
      real*8  xscale, yscale, xoff, yoff
      integer i
      common /plotdat/ x, y, xs, ys, xscale, yscale, xoff, yoff
      call pladv(0)

c      Use_ standard viewport, and define X range from 0 to 360 degrees,
c      Y range from -1.2 to 1.2.

      call plvsta()
      call plwind( 0.0d0, 360.0d0, -1.2d0, 1.2d0 )

c      Draw a box with ticks spaced 60 degrees apart in X, and 0.2 in Y.

      call plcol0(1)
      call plbox( 'bcnst', 60.0d0, 2, 'bcnstv', 0.2d0, 2 )

c      Superimpose a dashed line grid, with 1.5 mm marks and spaces. With
c      only a single mark and space element, we do not need arrays

      call plstyl( 1, 1500, 1500 )
      call plcol0(2)
      call plbox( 'g', 30.0d0, 0, 'g', 0.2d0, 0 )
      call plstyl( 0, 0, 0 )

      call plcol0(3)
      call pllab( 'Angle (degrees)', 'sine',
     &            '#frPLplot Example 1 - Sine function' )

      do i = 1, 101
        x(i) = 3.6d0 * (i-1)
        y(i) = sin( x(i) * PI/180.0d0 )
      enddo

      call plcol0(4)
      call plline( 101, x, y )
      end