3
<em>d.linegraph</em> is a primitive program to draw simple x,y line graphs
4
based on numerical data contained in separate files.
7
The X and Y data files for the graph are essentially a column of numbers in
8
each file, with one input number per line. The program expects that each X
9
value will have a corresponding Y value, therefore the number of lines in
10
each data input file should be the same. Essentially, the X data becomes
11
the X axis reference to which the Y data is plotted as a line. Therefore,
12
the X data should be a monotonically increasing progression of numbers (i.e.
13
"1,2,3,..."; "0, 10, 100, 1000,..."; "...-5,-1,0,1,5..."). If multiple Y
14
data files are used, the Y axis scale will be based on the range of minimum
15
and maximum values from all Y files, then all Y data given will be graphed
16
according to that Y scale. Therefore, if multiple Y data inputs are used
17
with dissimilar units, the graph produced comparing the two will be
22
<dt><b>directoryname</b>
23
<dd>Path to the directory where the input files are located. If this option
24
is not used, the <em>d.linegraph</em> looks for files in the current directory.
25
<dd>Example format: directory/usr/grass/data/graph
27
<dt><b>ycoloroption[,option,...]]</b>
28
<dd>Color to be used for drawing the lines in the graph. If multiple Y data
29
files are used, an equal number of colors may be used to control the colors
30
of the lines. Colors will be assigned to Y data in respect to the sequence
31
of instantiation on the command line. Options are listed below. By
32
default, a series of colors will be chosen by the program if none are
33
provided upon invocation.
34
<dd>Order of default colors: yellow, red, green, violet, blue, orange, gray,
35
brown, magenta, white, indigo).
37
<dt><b>titlecoloroption</b>
38
<dd>The color to be used for titles, axis lines, tics, and scale numbers.
40
<dd>Color options: red, orange, yellow, green, blue, indigo, violet,
41
magenta, brown, gray, white, and black.
43
<dt><b>xtitlevalue</b>
44
<dd>Title to describe X data. Will be centered beneath the graph. Default
45
is no title unless the need for a unit descriptor is computed by the program
46
(i.e. X: title in hundreds). Also, see NOTES section (below) for a format
47
caveat for multi-word titles.
49
<dt><b>ytitlevalue</b>
50
<dd>Title to describe Y data. Will be centered beneath the X data title.
51
Default is no title unless the need for a unit descriptor is computed by
52
the program (i.e. Y: ttiittllee in thousands). Also, see NOTES section
53
(below) for a format caveat for multi-word titles. In the case of graphs
54
with multiple lines, one may wish to use more specific title placement by
55
using the <em>d.text</em> or <em>v.label</em> programs.
58
<dd>Title to describe the graph. Will be centered over the top of graph.
59
Default is no title. See NOTES section (below) for a format caveat for
64
Since the command line parser is not amiable to multiple word inputs, to
65
input titles of more than one word, use the underscore character ("") to
66
represent spaces (" ").
68
Example: "titleCensusdata1990" would be printed over the graph as "Census
71
The way the program locates and labels tic marks is less than perfect: 1)
72
although distances between Y tics is proportional to the value, they are
73
not proportional on the X axis; 2) decimal values between -1 and 1 can be
74
printed on the X axis, but not on Y. (With respect to the later, the input
75
for Y values can all be multiplied by a factor of 10 before graphing).
78
It might be easier to use a 3rd party tool such as xgraph or GNUplot instead
79
of <em>d.linegraph</em>.
81
(You can make GNUplot output pretty by using its SVG or PostScript output
82
driver and converting that back into a rasterized image in a paint program)
86
<a href="d.frame.html">d.frame</a>,
87
<a href="d.text.html">d.text</a>,
88
<a href="v.label.html">v.label</a>
92
Chris Rewerts, Agricultural Engineering, Purdue University
95
<i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>