/usr/share/doc/gri/examples/example12.gri 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 | # Example 12 -- Linegraph with key inside plot
set font size 10 # points (1in = 72pt)
set x size 10 # cm
set y size 10 # cm
set x name "Height"
set y name "Total Energy"
# Following axis setups not necessary; will autoscale if you
# remove these.
set x margin 3
set x axis 800 960 20
set y margin 3
set y axis -0.4 1 0.2
# Read data. Format is columns (x, y1, y2, y3, y4)
open example12.dat
read columns x y
draw curve
draw label for last curve "1"
rewind
set line width {rpn ..linewidth.. 1.5 *}
read columns x * y
draw curve
draw label for last curve "2"
rewind
set line width {rpn ..linewidth.. 1.5 *}
read columns x * * y
draw curve
draw label for last curve "3"
rewind
set line width {rpn ..linewidth.. 1.5 *}
read columns x * * * y
draw curve
draw label for last curve "4"
# Draw the key.
# NOTES:
# (1) This key is inside the plot; it's location was chosen
# after looking at the data. To put the key in a different
# location, alter the .key_topleft_x. and .key_topleft_y.
# variables. For example, you could put the key to the
# right of the plot by changing the next line to:
# `.key_topleft_x. = {rpn ..xsize.. 0.5 +}'
# (2) The variable .dy_inc. is the spacing between lines in
# the key. It should be OK even if you change the
# font size above.
.key_topleft_x. = 0.5 # cm right of left axis
.key_topleft_y. = 0.5 # cm below top axis
.dy_inc. = {rpn ..fontsize.. pttocm 1.5 *}
draw label "1 = Model 1A" at \
{rpn ..xleft.. xusertocm .key_topleft_x. +} \
{rpn ..ytop.. yusertocm .key_topleft_y. -} cm
.key_topleft_y. += .dy_inc.
draw label "2 = Model 2A" at \
{rpn ..xleft.. xusertocm .key_topleft_x. +} \
{rpn ..ytop.. yusertocm .key_topleft_y. -} cm
.key_topleft_y. += .dy_inc.
draw label "3 = Model 1B" at \
{rpn ..xleft.. xusertocm .key_topleft_x. +} \
{rpn ..ytop.. yusertocm .key_topleft_y. -} cm
.key_topleft_y. += .dy_inc.
draw label "4 = Model 2B" at \
{rpn ..xleft.. xusertocm .key_topleft_x. +} \
{rpn ..ytop.. yusertocm .key_topleft_y. -} cm
draw title "Example 12 -- Total heating vs height of boundary layer"
|