<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>GRASS GIS: d.linegraph</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="grassdocs.css" type="text/css"> </head> <body bgcolor="white"> <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade> <h2>NAME</h2> <em><b>d.linegraph</b></em> - Generates and displays simple line graphs in the active graphics monitor display frame. <h2>KEYWORDS</h2> display <h2>SYNOPSIS</h2> <b>d.linegraph</b><br> <b>d.linegraph help</b><br> <b>d.linegraph</b> <b>x_file</b>=<em>string</em> <b>y_file</b>=<em>string</em>[,<i>string</i>,...] [<b>directory</b>=<em>string</em>] [<b>y_color</b>=<em>string</em>[,<i>string</i>,...]] [<b>title_color</b>=<em>string</em>] [<b>x_title</b>=<em>string</em>] [<b>y_title</b>=<em>string</em>] [<b>title</b>=<em>string</em>] [--<b>verbose</b>] [--<b>quiet</b>] <h3>Parameters:</h3> <DL> <DT><b>x_file</b>=<em>string</em></DT> <DD>Name of data file for X axis of graph</DD> <DT><b>y_file</b>=<em>string[,<i>string</i>,...]</em></DT> <DD>Name of data file(s) for Y axis of graph</DD> <DT><b>directory</b>=<em>string</em></DT> <DD>Path to file location</DD> <DD>Default: <em>.</em></DD> <DT><b>y_color</b>=<em>string[,<i>string</i>,...]</em></DT> <DD>Color for Y data</DD> <DD>Options: <em>red,orange,yellow,green,blue,indigo,violet,white,black,gray,brown,magenta,aqua,grey,cyan,purple</em></DD> <DT><b>title_color</b>=<em>string</em></DT> <DD>Color for axis, tics, numbers, and title</DD> <DD>Options: <em>red,orange,yellow,green,blue,indigo,violet,white,black,gray,brown,magenta,aqua,grey,cyan,purple</em></DD> <DD>Default: <em>black</em></DD> <DT><b>x_title</b>=<em>string</em></DT> <DD>Title for X data</DD> <DD>Default: <em></em></DD> <DT><b>y_title</b>=<em>string</em></DT> <DD>Title for Y data</DD> <DD>Default: <em></em></DD> <DT><b>title</b>=<em>string</em></DT> <DD>Title for Graph</DD> <DD>Default: <em></em></DD> </DL> <H2>DESCRIPTION</H2> <EM>d.linegraph</EM> is a primitive program to draw simple x,y line graphs based on numerical data contained in separate files. <P> Data file format<BR> The X and Y data files for the graph are essentially a column of numbers in each file, with one input number per line. The program expects that each X value will have a corresponding Y value, therefore the number of lines in each data input file should be the same. Essentially, the X data becomes the X axis reference to which the Y data is plotted as a line. Therefore, the X data should be a monotonically increasing progression of numbers (i.e. "1,2,3,..."; "0, 10, 100, 1000,..."; "...-5,-1,0,1,5..."). If multiple Y data files are used, the Y axis scale will be based on the range of minimum and maximum values from all Y files, then all Y data given will be graphed according to that Y scale. Therefore, if multiple Y data inputs are used with dissimilar units, the graph produced comparing the two will be deceptive. <P> <DL> <DT><B>directoryname</B> <DD>Path to the directory where the input files are located. If this option is not used, the <EM>d.linegraph</EM> looks for files in the current directory. <DD>Example format: directory/usr/grass/data/graph <DT><B>ycoloroption[,option,...]]</B> <DD>Color to be used for drawing the lines in the graph. If multiple Y data files are used, an equal number of colors may be used to control the colors of the lines. Colors will be assigned to Y data in respect to the sequence of instantiation on the command line. Options are listed below. By default, a series of colors will be chosen by the program if none are provided upon invocation. <DD>Order of default colors: yellow, red, green, violet, blue, orange, gray, brown, magenta, white, indigo). <DT><B>titlecoloroption</B> <DD>The color to be used for titles, axis lines, tics, and scale numbers. <DD>Default: "white" <DD>Color options: red, orange, yellow, green, blue, indigo, violet, magenta, brown, gray, white, and black. <DT><B>xtitlevalue</B> <DD>Title to describe X data. Will be centered beneath the graph. Default is no title unless the need for a unit descriptor is computed by the program (i.e. X: title in hundreds). Also, see NOTES section (below) for a format caveat for multi-word titles. <DT><B>ytitlevalue</B> <DD>Title to describe Y data. Will be centered beneath the X data title. Default is no title unless the need for a unit descriptor is computed by the program (i.e. Y: ttiittllee in thousands). Also, see NOTES section (below) for a format caveat for multi-word titles. In the case of graphs with multiple lines, one may wish to use more specific title placement by using the <EM>d.text</EM> or <EM>v.label</EM> programs. <DT><B>titlevalue</B> <DD>Title to describe the graph. Will be centered over the top of graph. Default is no title. See NOTES section (below) for a format caveat for multi-word titles. </DL> <H2>NOTES</H2> Since the command line parser is not amiable to multiple word inputs, to input titles of more than one word, use the underscore character ("") to represent spaces (" "). <P> Example: "titleCensusdata1990" would be printed over the graph as "Census data 1990". <P> The way the program locates and labels tic marks is less than perfect: 1) although distances between Y tics is proportional to the value, they are not proportional on the X axis; 2) decimal values between -1 and 1 can be printed on the X axis, but not on Y. (With respect to the later, the input for Y values can all be multiplied by a factor of 10 before graphing). <P> It might be easier to use a 3rd party tool such as xgraph or GNUplot instead of <em>d.linegraph</em>. . (You can make GNUplot output pretty by using its SVG or PostScript output driver and converting that back into a rasterized image in a paint program) <H2>SEE ALSO</H2> <EM> <A HREF="d.frame.html">d.frame</A>, <A HREF="d.text.html">d.text</A>, <A HREF="v.label.html">v.label</A> </EM> <H2>AUTHOR</H2> Chris Rewerts, Agricultural Engineering, Purdue University <p> <i>Last changed: $Date: 2007-05-30 12:46:54 +0200 (Wed, 30 May 2007) $</i> <HR> <P><a href="index.html">Main index</a> - <a href="display.html">display index</a> - <a href="full_index.html">Full index</a></P> <P>© 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p> </body> </html>