/usr/share/doc/gri/html/example8.html is in gri-html-doc 2.12.26-1build1.
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 | <html>
<head>
<title>example8.gri</title>
</head>
<body bgcolor="#FFFFFF">
<i># This html document was prepared by gri2html based on the Gri script named</i>
<br><i># <a href="example8.gri">example8.gri</a></i>
<br># <i>Gri is available for free at <a href="http://gri.sourceforge.net">http://gri.sourceforge.net</a></i>
<pre>
<font color=#B22222># Example 8 -- Plot T=T(x,rho) section of eubex data</font>
<font color=#0000EE>`Initialize Parameters'</font>
{
<font color=#0000EE>\FILE_DATA =</font> <font color=#2F4F4F>"example8a.dat"</font> <font color=#B22222># T vs rho</font>
<font color=#0000EE>\FILE_LOCN =</font> <font color=#2F4F4F>"example8b.dat"</font> <font color=#B22222># section distances</font>
set missing value -99.0
<font color=#B22222>#</font>
<font color=#B22222># Following values from ~/eubex/processing/to_rho_bins/do_rho_inter</font>
<font color=#0000EE>\RHO_MIN =</font> <font color=#2F4F4F>"28.1"</font>
<font color=#0000EE>\RHO_MAX =</font> <font color=#2F4F4F>"27.5"</font>
<font color=#0000EE>\RHO_INC =</font> <font color=#2F4F4F>"-0.002"</font>
<font color=#0000EE>\NY =</font> <font color=#2F4F4F>"301"</font>
<font color=#0000EE>\xmin =</font> <font color=#2F4F4F>"350"</font>
<font color=#0000EE>\xmax =</font> <font color=#2F4F4F>"0"</font>
<font color=#0000EE>\xinc =</font> <font color=#2F4F4F>"-100"</font>
<font color=#0000EE>\ymin =</font> <font color=#2F4F4F>"28.1"</font>
<font color=#0000EE>\ymax =</font> <font color=#2F4F4F>"27.8"</font>
<font color=#0000EE>\yinc =</font> <font color=#2F4F4F>"-0.1"</font>
<font color=#0000EE>\zmin =</font> <font color=#2F4F4F>"0"</font>
<font color=#0000EE>\zmax =</font> <font color=#2F4F4F>"2.5"</font>
}
<font color=#0000EE>`Initialize Axes'</font>
/*
Set up axes
*/
{
set x name <font color=#2F4F4F>"km"</font>
set x size 10
set x axis<font color=#0000EE> \xmin</font><font color=#0000EE> \xmax</font><font color=#0000EE> \xinc
</font> set y name <font color=#2F4F4F>"$\sigma_T$"</font>
set y size 5
set y axis name horizontal
set y axis<font color=#0000EE> \ymin</font><font color=#0000EE> \ymax</font><font color=#0000EE> \yinc
</font> set y format <font color=#2F4F4F>"%.1f"</font>
}
<font color=#0000EE>`Initialize Files'</font>
{
query<font color=#0000EE> \data</font> <font color=#2F4F4F>"Data file? " ("\FILE_DATA"</font>)
query<font color=#0000EE> \locn</font> <font color=#2F4F4F>"Station locn?" ("\FILE_LOCN"</font>)
}
<font color=#0000EE>`Read Data'</font>
{
<font color=#B22222># Read x-locations</font>
<font color=#9400D3>system</font> <font color=#FF0000>awk '{print $2}' <<font color=#0000EE> \locn</font> > TMP</font>
<font color=#9400D3>system</font> <font color=#FF0000>wc TMP | awk '{print $1}' > NUM</font>
open NUM
read<font color=#CDAD00> .gridx_number.</font>
close
<font color=#9400D3>system</font> <font color=#FF0000>rm NUM </font>
open TMP
read grid x<font color=#CDAD00> .gridx_number.</font>
close
<font color=#9400D3>system</font> <font color=#FF0000>rm TMP</font>
<font color=#B22222># Create y-locations</font>
set y grid<font color=#0000EE> \RHO_MIN</font><font color=#0000EE> \RHO_MAX</font><font color=#0000EE> \RHO_INC
</font> <font color=#B22222>#</font>
<font color=#B22222># Read data</font>
open<font color=#0000EE> \data
</font> read grid data<font color=#0000EE> \NY<font</font> color=#CDAD00> .gridx_number.</font>
close
}
<font color=#0000EE>`Plot Contours'</font>
{
set graylevel<font color=#CDAD00> .contour_graylevel.</font>
set clip on
set line width 0.5
draw contour -3 3 0.25 unlabelled
<font color=#B22222>#</font>
<font color=#B22222># wide line at 0 degrees</font>
set line width 2
draw contour 0 unlabelled
}
<font color=#0000EE>`Plot Image And Maybe Contours'</font>
{
<font color=#0000EE>\imagefile =</font> <font color=#2F4F4F>"image"</font>
set image range<font color=#0000EE> \zmin</font><font color=#0000EE> \zmax
</font> convert grid to image box<font color=#0000EE> \xmin</font> <font color=#0000EE> \ymin</font><font color=#0000EE> \xmax</font><font color=#0000EE> \ymax
</font> query<font color=#0000EE> \dohisto</font> <font color=#2F4F4F>"Do histogram scaling? (yes|no)" ("yes"</font>)
<font color=#0000EE>\incs =</font> <font color=#2F4F4F>"no"</font>
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\dohisto" =</font>= "yes"</font>}
set image grayscale using histogram
<font color=#9400D3>else</font>
<font color=#0000EE>\zinc =</font> <font color=#2F4F4F>"0.25"</font>
query<font color=#0000EE> \incs</font> <font color=#2F4F4F>"In linear scaling, band at an increment of<font color=#0000EE> \zinc?"</font> ("yes"</font>)
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\incs" =</font>= "yes"</font>}
set image grayscale black<font color=#0000EE> \zmin</font> white<font color=#0000EE> \zmax</font> increment<font color=#0000EE> \zinc
</font> <font color=#9400D3>else</font>
set image grayscale black<font color=#0000EE> \zmin</font> white<font color=#0000EE> \zmax
</font> <font color=#9400D3>end if</font>
<font color=#9400D3>end if</font>
write image rasterfile to<font color=#0000EE> \imagefile
</font> show <font color=#2F4F4F>"wrote image rasterfile `\imagefile '"</font>
draw image
draw image palette
query<font color=#0000EE> \do_contours</font> <font color=#2F4F4F>"Do contours as well (yes|no)" ("yes"</font>)
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\do_contours" =</font>= "yes"</font>}
Plot Contours
<font color=#9400D3>end if</font>
draw title <font color=#2F4F4F>"Example 8 --<font color=#0000EE> \data</font> black=\zmin white=\zmax"</font>
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\dohisto" =</font>= "yes"</font>}
draw title <font color=#2F4F4F>"Histogram enhanced grayscales"</font>
<font color=#9400D3>else</font>
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\incs" =</font>= "yes"</font>}
draw title <font color=#2F4F4F>"Grayscale banded at intervals of<font color=#0000EE> \zinc"</font>
</font> <font color=#9400D3>end if</font>
<font color=#9400D3>end if</font>
}
Initialize Parameters
Initialize Axes
Initialize Files
Read Data
query<font color=#0000EE> \doimage</font> <font color=#2F4F4F>"Draw image (yes|no)" ("no"</font>)
<font color=#9400D3>if</font> {<font color=#2F4F4F>"<font color=#0000EE>\doimage" =</font>= "yes"</font>}
<font color=#0000EE>.contour_graylevel. =</font> 1 <font color=#B22222># white contours </font>
Plot Image And Maybe Contours
<font color=#9400D3>else</font>
<font color=#0000EE>.contour_graylevel. =</font> 0 <font color=#B22222># black contours </font>
Plot Contours
draw title <font color=#2F4F4F>"Example 8"</font>
<font color=#9400D3>end if</font>
</pre>
</body>
</html>
|