1d.linegraph(1) Grass User's Manual d.linegraph(1)
2
3
4
6 d.linegraph - Generates and displays simple line graphs in the active
7 graphics monitor display frame.
8
10 display
11
13 d.linegraph
14 d.linegraph help
15 d.linegraph x_file=string y_file=string[,string,...] [direc‐
16 tory=string] [y_color=string[,string,...]] [title_color=string]
17 [x_title=string] [y_title=string] [title=string] [--verbose]
18 [--quiet]
19
20 Parameters:
21 x_file=string
22 Name of data file for X axis of graph
23
24 y_file=string[,string,...]
25 Name of data file(s) for Y axis of graph
26
27 directory=string
28 Path to file location
29 Default: .
30
31 y_color=string[,string,...]
32 Color for Y data
33 Options: red,orange,yellow,green,blue,indigo,vio‐
34 let,white,black,gray,brown,magenta,aqua,grey,cyan,purple
35
36 title_color=string
37 Color for axis, tics, numbers, and title
38 Options: red,orange,yellow,green,blue,indigo,vio‐
39 let,white,black,gray,brown,magenta,aqua,grey,cyan,purple
40 Default: black
41
42 x_title=string
43 Title for X data
44 Default:
45
46 y_title=string
47 Title for Y data
48 Default:
49
50 title=string
51 Title for Graph
52 Default:
53
55 d.linegraph is a primitive program to draw simple x,y line graphs based
56 on numerical data contained in separate files.
57
58 Data file format
59 The X and Y data files for the graph are essentially a column of num‐
60 bers in each file, with one input number per line. The program expects
61 that each X value will have a corresponding Y value, therefore the num‐
62 ber of lines in each data input file should be the same. Essentially,
63 the X data becomes the X axis reference to which the Y data is plotted
64 as a line. Therefore, the X data should be a monotonically increasing
65 progression of numbers (i.e. "1,2,3,..."; "0, 10, 100, 1000,...";
66 "...-5,-1,0,1,5..."). If multiple Y data files are used, the Y axis
67 scale will be based on the range of minimum and maximum values from all
68 Y files, then all Y data given will be graphed according to that Y
69 scale. Therefore, if multiple Y data inputs are used with dissimilar
70 units, the graph produced comparing the two will be deceptive.
71
72 directoryname
73 Path to the directory where the input files are located. If this
74 option is not used, the d.linegraph looks for files in the cur‐
75 rent directory.
76 Example format: directory/usr/grass/data/graph
77
78 ycoloroption[,option,...]]
79 Color to be used for drawing the lines in the graph. If multiple
80 Y data files are used, an equal number of colors may be used to
81 control the colors of the lines. Colors will be assigned to Y
82 data in respect to the sequence of instantiation on the command
83 line. Options are listed below. By default, a series of colors
84 will be chosen by the program if none are provided upon invoca‐
85 tion.
86 Order of default colors: yellow, red, green, violet, blue,
87 orange, gray, brown, magenta, white, indigo).
88
89 titlecoloroption
90 The color to be used for titles, axis lines, tics, and scale
91 numbers.
92 Default: "white"
93 Color options: red, orange, yellow, green, blue, indigo, violet,
94 magenta, brown, gray, white, and black.
95
96 xtitlevalue
97 Title to describe X data. Will be centered beneath the graph.
98 Default is no title unless the need for a unit descriptor is
99 computed by the program (i.e. X: title in hundreds). Also, see
100 NOTES section (below) for a format caveat for multi-word titles.
101
102 ytitlevalue
103 Title to describe Y data. Will be centered beneath the X data
104 title. Default is no title unless the need for a unit descrip‐
105 tor is computed by the program (i.e. Y: ttiittllee in thou‐
106 sands). Also, see NOTES section (below) for a format caveat for
107 multi-word titles. In the case of graphs with multiple lines,
108 one may wish to use more specific title placement by using the
109 d.text or v.label programs.
110
111 titlevalue
112 Title to describe the graph. Will be centered over the top of
113 graph. Default is no title. See NOTES section (below) for a
114 format caveat for multi-word titles.
115
117 Since the command line parser is not amiable to multiple word inputs,
118 to input titles of more than one word, use the underscore character
119 ("") to represent spaces (" ").
120
121 Example: "titleCensusdata1990" would be printed over the graph as "Cen‐
122 sus data 1990".
123
124 The way the program locates and labels tic marks is less than perfect:
125 1) although distances between Y tics is proportional to the value, they
126 are not proportional on the X axis; 2) decimal values between -1 and 1
127 can be printed on the X axis, but not on Y. (With respect to the later,
128 the input for Y values can all be multiplied by a factor of 10 before
129 graphing).
130
131 It might be easier to use a 3rd party tool such as xgraph or GNUplot
132 instead of d.linegraph. (You can make GNUplot output pretty by using
133 its SVG or PostScript output driver and converting that back into a
134 rasterized image in a paint program)
135
137 d.frame, d.text, v.label
138
140 Chris Rewerts, Agricultural Engineering, Purdue University
141
142 Last changed: $Date: 2007-05-30 12:46:54 +0200 (Wed, 30 May 2007) $
143
144 Full index
145
146 © 2003-2008 GRASS Development Team
147
148
149
150GRASS 6.3.0 d.linegraph(1)