/usr/share/doc/gri/html/example3.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 75 76 | # Example 3 -- Controlling scales, etc
#
# Example of how to control axis scales, etc. This example makes
# two panels, plotting the same data in different ways.
#
#
# ----- PANEL 2 ------------------------------------------------
#
# Set up the x axis.
#
# Make the x axis run from 0 to 1, with labelled tics each 0.25.
set x axis 0 1 .25
# Make the plot 5 cm wide.
set x size 5
# 2 cm of space between the left edge of the plot
# and the left edge of the paper.
set x margin 2
# Give the x-axis the name "t" with subscript 0.
set x name "$t_0$"
#
# Set up the y axis.
#
# Make the y axis run from 10 to 20, with labelled tics at intervals
# of 5 and smaller, unlabelled, tics, at intervals of 1. Other
# commands are similar to those for the x-axis.
set y axis 10 20 5 1
set y size 10
set y margin 2
set y name "F"
#
# Now, read our simple data set.
open example1.dat
read columns x y
close
#
# Draw a curve connecting these (x,y) data. Note that the axes, as
# defined above, will be drawn automatically along with the curve.
draw curve
#
# ----- PANEL 2 -----------------------------------------
#
# OK, now for a more complicated version. We'll keep the
# same data, but redraw it in a new panel, to the right of
# the first graph. So, the first step is to increase the
# x margin. The rpn command creates a number which is
# the sum of the old x margin (stored in the variable
# ..xmargin..) and the old plot width (stored in
# the variable ..xsize..), plus an extra 1 cm
set x margin {rpn ..xsize.. ..xmargin.. + 1 +}
#
# Set the line thickness for the curve to 1 point (0.3 mm) and the
# axis line thickness to 0.2 points (0.1 mm).
set line width 1.0 # points
set line width axis 0.2 # points
# Set the tics to be 1.5 mm.
set tic size 0.15 # centimetres
# Draw axes and frame, with axes offset from frame. Some
# people find this more attractive.
set axes style offset
draw axes 1
# Now draw the actual curve.
draw curve
# Superimpose dots (radius 1.5 mm) at the data.
set symbol size 0.15
draw symbol bullet
#
# All done.
# Draw a title above the plot.
set font size 20
\label = "Example 3 -- scales, axes, etc"
draw label "\label" centered at \
{rpn 2 5 + .5 + } \
{rpn ..ytop.. yusertocm 2 +} cm
|