aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/gra_over
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:38:23 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:38:23 +0000
commit78c2bcf9e96ab00615ee6f96905bca78fcd52a00 (patch)
tree9c7e31f2a59e174433e55b589771005b48a34158 /doc/user/gra_over
parent9daa98ce90ceeeaba9e942d28575d8fcfe36db4b (diff)
downloadlout-78c2bcf9e96ab00615ee6f96905bca78fcd52a00.tar.gz
Lout 3.27.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@23 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'doc/user/gra_over')
-rw-r--r--doc/user/gra_over171
1 files changed, 103 insertions, 68 deletions
diff --git a/doc/user/gra_over b/doc/user/gra_over
index 1b9653a..5bffe08 100644
--- a/doc/user/gra_over
+++ b/doc/user/gra_over
@@ -9,7 +9,10 @@ symbol, with their values enclosed in braces; they may appear in any order,
and if omitted are assigned some sensible default value.
@PP
There is a @Code "style" option for controlling the overall style of the
-style.graph @Index { @Code "style" option of @Code "@Graph" }
+graphs. @RawIndex { graphs (statistical) }
+graphs.style @SubIndex { @Code style option }
+style. @RawIndex { @Code "style" option }
+style.in.graphs @SubIndex { in graphs }
axes. @Index { axes in graphs }
graph, whose value may be either {@Code "frame"}, {@Code "none"},
or {@Code "axes"}. The default value is {@Code "frame"}, and it produces
@@ -20,33 +23,39 @@ graphs that don't look like graphs, as it were.
@PP
If the other value, {@Code "axes"}, is chosen, two other options called
{@Code xorigin} and {@Code yorigin} become compulsory:
-@ID @OneRow @Code {
-"-2p @Font @Graph"
-" style { axes }"
-" xorigin { 0 }"
-" yorigin { 0 }"
-" width { 12 cm }"
-" height { 7 cm }"
-" leftcaption { 90d @Rotate { counts (%) } }"
-" leftgap { 1.0 cm }"
-" belowcaption { time (min) }"
-" belowgap { 0 cm }"
-"{"
-" @Data"
-" points { filledsquare }"
-" pairs { solid }"
-" { 0 0.0 1 4.8 2 7.0 3 15.2 4 19.8 5 20.0 6 21.0 7 25.0"
-" 10 29.5 15 31.2 20 35.0 30 40.0 60 50.8"
-" }"
-""
-" @Data"
-" points { square }"
-" pairs { solid }"
-" {"
-" 0 0.0 1 3.7 1.5 43.1 2 99.1 3 85.6 4 69.1 5 47.0 6 44.1 7 40.8"
-" 10 35.0 15 29.4 20 25.0 30 21.1 60 15.5"
-" }"
-"}"
+graphs. @RawIndex { graphs (statistical) }
+graphs.xorigin @SubIndex { @Code xorigin option }
+xorigin.graph @Index { @Code "xorigin" option (graphs) }
+graphs. @RawIndex { graphs (statistical) }
+graphs.yorigin @SubIndex { @Code yorigin option }
+yorigin.graph @Index { @Code "yorigin" option (graphs) }
+@ID @OneRow @Code @Verbatim {
+-2p @Font @Graph
+ style { axes }
+ xorigin { 0 }
+ yorigin { 0 }
+ width { 12c }
+ height { 7c }
+ leftcaption { 90d @Rotate { counts (%) } }
+ leftgap { 1.0c }
+ belowcaption { time (min) }
+ belowgap { 0c }
+{
+ @Data
+ points { filledsquare }
+ pairs { solid }
+ { 0 0.0 1 4.8 2 7.0 3 15.2 4 19.8 5 20.0 6 21.0 7 25.0
+ 10 29.5 15 31.2 20 35.0 30 40.0 60 50.8
+ }
+
+ @Data
+ points { square }
+ pairs { solid }
+ {
+ 0 0.0 1 3.7 1.5 43.1 2 99.1 3 85.6 4 69.1 5 47.0 6 44.1 7 40.8
+ 10 35.0 15 29.4 20 25.0 30 21.1 60 15.5
+ }
+}
}
We have requested a smaller font size for this graph as a whole by
preceding it with {@Code "-2p @Font"}, meaning two points smaller, and
@@ -56,12 +65,12 @@ resulting graph has an x axis and a y axis instead of a frame, like this:
style { axes }
xorigin { 0 }
yorigin { 0 }
- width { 12 cm }
- height { 7 cm }
+ width { 12c }
+ height { 7c }
leftcaption { 90d @Rotate { counts (%) } }
- leftgap { 1.0 cm }
+ leftgap { 1.0c }
belowcaption { time (min) }
- belowgap { 0 cm }
+ belowgap { 0c }
{
@Data
points { filledsquare }
@@ -91,15 +100,21 @@ and the other would have r ticks (adjacent to the right-hand side of the
frame).
@PP
There are @Code "xlog" and @Code "ylog" options which produce
+graphs. @RawIndex { graphs (statistical) }
+graphs.xlog @SubIndex { @Code xlog option }
+xlog.graph @Index { @Code "xlog" option (graphs) }
+graphs. @RawIndex { graphs (statistical) }
+graphs.ylog @SubIndex { @Code ylog option }
+ylog.graph @Index { @Code "ylog" option (graphs) }
logarithmic.axes @Index { logarithmic axes in graphs }
logarithmic x and y axes:
-@ID @OneRow @Code {
-"@Graph"
-" xlog { 10 }"
-" ylog { 10 }"
-"{"
-" ..."
-"}"
+@ID @OneRow @Code @Verbatim {
+@Graph
+ xlog { 10 }
+ ylog { 10 }
+{
+ ...
+}
}
The value is the base of the logarithm, usually 10 or 2, or
{@Code none} (the default) meaning not logarithmic. Logarithms
@@ -110,14 +125,22 @@ x ticks, or {@Code "xorigin"} or {@Code "xmin"} options; and similarly
for {@Code "ylog"}.
@PP
There are @Code "width" and @Code "height" options for setting the size
+graphs. @RawIndex { graphs (statistical) }
+graphs.width @SubIndex { @Code width option }
+width. @RawIndex { @Code "width" option }
+width.in.graphs @SubIndex { in graphs }
+graphs. @RawIndex { graphs (statistical) }
+graphs.height @SubIndex { @Code height option }
+height. @RawIndex { @Code "height" option }
+height.in.graphs @SubIndex { in graphs }
of the total area enclosed:
-@ID @OneRow @Code {
-"@Graph"
-" width { 6.0 cm }"
-" height { 4.0 cm }"
-"{"
-" ..."
-"}"
+@ID @OneRow @Code @Verbatim {
+@Graph
+ width { 6.0c }
+ height { 4.0c }
+{
+ ...
+}
}
This shows the default width and height, six centimetres and four
centimetres. These lengths and others discussed below can be specified
@@ -126,39 +149,48 @@ for the details).
@PP
Within the frame or axes, a small margin is kept free of data points. The
size of this margin is controlled by @Code "xextra" and @Code "yextra"
+graphs. @RawIndex { graphs (statistical) }
+graphs.xextra @SubIndex { @Code xextra option }
+xextra.graph @Index { @Code "xextra" option (graphs) }
+graphs. @RawIndex { graphs (statistical) }
+graphs.yextra @SubIndex { @Code yextra option }
+yextra.graph @Index { @Code "yextra" option (graphs) }
options:
-@ID @OneRow @Code {
-"@Graph"
-" xextra { 0.5 cm }"
-" yextra { 0.5 cm }"
-"{"
-" ..."
-"}"
+@ID @OneRow @Code @Verbatim {
+@Graph
+ xextra { 0.5c }
+ yextra { 0.5c }
+{
+ ...
+}
}
-Setting @Code "xextra" to @Code "0.5 cm" (the default value if the
+Setting @Code "xextra" to @Code "0.5c" (the default value if the
@Code style option is {@Code frame}) means that the smallest x value
will be placed 0.5 centimetres to the right of the left boundary, and
the largest will be placed 0.5 centimetres to the left of the right
-boundary. It is quite safe to set @Code "xextra" to @Code "0 cm" if
+boundary. It is quite safe to set @Code "xextra" to @Code "0c" if
desired, and indeed this is the default value when @Code style is
{@Code axes} or {@Code none}. The @Code "yextra" option works in
exactly the same way for y values.
@PP
The @Code "xdecreasing" option plots the x values in decreasing order
+graphs. @RawIndex { graphs (statistical) }
+graphs.xdecreasing @SubIndex { @Code xdecreasing option }
+xdecreasing.graph @Index { @Code "xdecreasing" option (graphs) }
instead of increasing:
-@ID @Code {
-"@Graph"
-" xdecreasing { yes }"
-" abovecaption { New South Wales road deaths, 1960--1990"
-"(fatalities per 100 million vehicle km) }"
-"{"
-" @Data"
-" points { plus }"
-" pairs { dashed }"
-" {"
-" 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0"
-" }"
-"}"
+@ID @Code @Verbatim {
+@Graph
+ xdecreasing { yes }
+ abovecaption { New South Wales road deaths, 1960--1990
+(fatalities per 100 million vehicle km) }
+{
+ @Data
+ points { plus }
+ pairs { dashed }
+ {
+ 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0
+ }
+}
}
produces
@CD @Graph
@@ -175,5 +207,8 @@ produces
}
The value of @Code "xdecreasing" should be either @Code "no" (the default
value) or {@Code "yes"}. A similar @Code "ydecreasing" option does the same
+graphs. @RawIndex { graphs (statistical) }
+graphs.ydecreasing @SubIndex { @Code ydecreasing option }
+ydecreasing.graph @Index { @Code "ydecreasing" option (graphs) }
thing to the y axis.
@End @Section