This file is indexed.

/usr/share/ncarg/hluex/xyplot/xy07f.f is in libncarg-data 6.3.0-6build1.

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
C
C      $Id: xy07f.f,v 1.8 2010-03-15 22:49:25 haley Exp $
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C                                                                      C
C                Copyright (C)  1995                                   C
C        University Corporation for Atmospheric Research               C
C                All Rights Reserved                                   C
C                                                                      C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C  File:       xy07f.f
C
C  Author:     Mary Haley (converted from example "agex11")
C          National Center for Atmospheric Research
C          PO 3000, Boulder, Colorado
C
C  Date:       Mon Apr 24 11:11:02 MST 1995
C
C  Description:   This example is similar to the ncargex Autograph
C                 example "agex11".  It shows how to draw a "scattergram".
C                 It also shows one way on how to modify the color map
C                 so we can get a different background/foreground color.
C
      external NhlFAppClass
      external NhlFCairoWindowWorkstationClass
      external NhlFNcgmWorkstationClass
      external NhlFPSWorkstationClass
      external NhlFPDFWorkstationClass
      external NhlFCairoPSPDFWorkstationClass
      external NhlFCairoImageWorkstationClass
      external NhlFCoordArraysClass
      external NhlFXyPlotClass

      parameter(NPTS=250)
C
C Create data arrays for XyPlot object.
C
      real xdra(NPTS), ydra(NPTS)

      integer appid,xworkid,plotid,dataid(2)
      integer i, j, len(2)
      real cmap(3,4)
      character*10 datastr
      CHARACTER*7  wks_type
C
C Define the workstation type
C
      wks_type = "x11"
C
C
C Initialize the HLU library and set up resource template.
C
      call NhlFInitialize
      call NhlFRLCreate(rlist,'setrl')
C
C Change the color map so we can have a white background, a black
C foreground and two colors defined for our markers.  Color '1' is
C the background color and '2' is the foreground color.
C
      cmap(1,1) = 1.
      cmap(2,1) = 1.
      cmap(3,1) = 1.
      cmap(1,2) = 0.
      cmap(2,2) = 0.
      cmap(3,2) = 0.
      cmap(1,3) = 1.
      cmap(2,3) = 0.
      cmap(3,3) = 0.
      cmap(1,4) = 0.
      cmap(2,4) = 0.
      cmap(3,4) = 1.
      len(1) = 3
      len(2) = 4
C
C Create Application object.  The Application object name is used to
C determine the name of the resource file, which is "xy07.res" in
C this case.
C
      call NhlFRLClear(rlist)
      call NhlFRLSetString(rlist,'appDefaultParent','True',ierr)
      call NhlFRLSetString(rlist,'appUsrDir','./',ierr)
      call NhlFCreate(appid,'xy07',NhlFAppClass,0,rlist,ierr)

      if (wks_type.eq."ncgm".or.wks_type.eq."NCGM") then
C
C Create an NCGMWorkstation object.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkMetaName','./xy07f.ncgm',ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFNcgmWorkstationClass,0,rlist,ierr)
      else if (wks_type.eq."x11".or.wks_type.eq."X11") then
C
C Create an XWorkstation object.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkPause','True',ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFCairoWindowWorkstationClass,
     +        0,rlist,ierr)
      else if (wks_type.eq."oldps".or.wks_type.eq."OLDPS") then
C
C Create a PSWorkstation object.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkPSFileName','./xy07f.ps',ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFPSWorkstationClass,0,rlist,ierr)
      else if (wks_type.eq."oldpdf".or.wks_type.eq."OLDPDF") then
C
C Create a PDFWorkstation object.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkPDFFileName','./xy07f.pdf',ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFPDFWorkstationClass,0,rlist,ierr)
      else if (wks_type.eq."pdf".or.wks_type.eq."PDF".or.
     +         wks_type.eq."ps".or.wks_type.eq."PS") then
C
C Create a cairo PS/PDF workstation.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkFileName','./xy07f',ierr)
         call NhlFRLSetString(rlist,'wkFormat',wks_type,ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFcairoPSPDFWorkstationClass,0,rlist,ierr)
      else if (wks_type.eq."png".or.wks_type.eq."PNG") then
C
C Create a cairo PNG workstation.
C
         call NhlFRLClear(rlist)
         call NhlFRLSetString(rlist,'wkFileName','./xy07f',ierr)
         call NhlFRLSetString(rlist,'wkFormat',wks_type,ierr)
         call NhlFRLSetMDFloatArray(rlist,'wkColorMap',cmap,2,len,ierr)
         call NhlFCreate(xworkid,'xy07Work',
     +        NhlFcairoImageWorkstationClass,0,rlist,ierr)
      endif
C
C Since we have two sets of points that we want to color differently,
C we need to create two Data obects here.
C
      do 20 j = 1,2
C
C Initialize data.
C
         do 10 i = 1, NPTS
            xdra(i)=.5+(2.*(fran()-.5))**5
            ydra(i)=.5+(2.*(fran()-.5))**5
 10     continue
C
C Define a data object.  Note that we are naming each object differently
C so we can distinguish them in the resource file.
C
        call NhlFRLClear(rlist)
        call NhlFRLSetFloatArray(rlist,'caXArray',xdra,NPTS,ierr)
        call NhlFRLSetFloatArray(rlist,'caYArray',ydra,NPTS,ierr)
        write(datastr,30)j-1
        call NhlFCreate(dataid(j),datastr,NhlFcoordArraysClass,0,rlist,
     +                  ierr)
 20   continue
 30   format('xyData',i1)
C
C Create the XyPlot object.
C
      call NhlFRLClear(rlist)
      call NhlFRLSetIntegerArray(rlist,'xyCoordData',dataid,2,ierr)
      call NhlFCreate(plotid,'xyPlot',NhlFxyPlotClass,xworkid,rlist,
     +     ierr)
C
C Draw the plot.
C
      call NhlFDraw(plotid,ierr)
      call NhlFFrame(xworkid,ierr)
C
C NhlDestroy destroys the given id and all of its children
C so destroying xworkwid will also destroy plotid.
C
      call NhlFDestroy(xworkid,ierr)
C
C Restores state.
C
      call NhlFDestroy(appid,ierr)
      call NhlFClose

      stop
      end
      
      function fran()
C
C Pseudo-random-number generator.
C
      double precision x
      save x
      data x / 2.718281828459045 /
      x=mod(9821.d0*x+.211327d0,1.d0)
      fran=real(x)
      return
      end