ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/bgraph.1
Revision: 1.4
Committed: Thu Oct 27 00:20:08 2005 UTC (19 years ago) by greg
Branch: MAIN
CVS Tags: rad3R8
Changes since 1.3: +5 -5 lines
Log Message:
Updated "SEE ALSO" links

File Contents

# User Rev Content
1 greg 1.4 .\" RCSid "$Id: bgraph.1,v 1.3 2004/01/01 19:31:44 greg Exp $"
2 greg 1.1 .TH BGRAPH 1 6/24/98 RADIANCE
3     .SH NAME
4     bgraph - do a set of batch graphs to a metafile
5     .SH SYNOPSIS
6     .B bgraph
7     [
8     .B \-type ..
9     ][
10     .B +variable value ..
11     ][
12     .B file ..
13     ]
14     .SH DESCRIPTION
15     .I Bgraph
16     reads each graph
17     .I file
18     in sequence and converts it to a plot suitable
19     for use by a metafile driver program.
20     If no files are given, the standard input is read.
21     .PP
22     The graph type can be defined with a
23     .I \-type
24     option.
25     Types are simply include files which set default values for
26     certain variables.
27     The actual include file name is the type concatanated with ".plt".
28     Typical types are "scatter", "line", and "curve".
29     A scatter graph shows only points.
30     A line graph shows only lines connecting points.
31     A curve graph shows both points and connecting lines.
32     .PP
33     Variables can be set explicitly with
34     .I +variable value
35     options.
36     The following standard graph variables are supported:
37     .TP 10n
38     .BR fthick
39     The frame thickness, valued from 0 to 4.
40     A value of 0 turns the frame off.
41     .TP
42     .BR grid
43     The grid: 1 is on, 0 is off.
44     .TP
45     .BR include
46     The include file name.
47     Graph input is taken from the file.
48     If the file is not found in the current directory, it is
49     searched for in a set of standard locations.
50     .TP
51     .BR legend
52     The legend title.
53     .TP
54     .BR othick
55     The origin axis thickness, valued from 0 to 4.
56     A value of 0 turns the origin off.
57     .TP
58     .BR period
59     The period for a polar plot.
60     For a plot in degrees, use 360.
61     For radians, use 6.283.
62     A value of 0 (the default) indicates a Cartesian plot.
63     .TP
64     .BR subtitle
65     The graph subtitle.
66     .TP
67     .BR symfile
68     The point symbol metafile.
69     .TP
70     .BR tstyle
71     The frame tick mark style.
72     The default value is 1, which is outward tick marks.
73     A value of 2 is inward ticks, 3 is cross ticks.
74     A value of 0 disables frame tick marks.
75     .TP
76     .BR title
77     The graph title.
78     .TP
79     .BR xlabel
80     The x axis label.
81     .TP
82     .BR xmap
83     The x axis mapping function.
84     An x axis mapping xmap(x)=log(x) produces a log x axis.
85     .TP
86     .BR xmax
87     The x axis maximum.
88     .TP
89     .BR xmin
90     The x axis minimum.
91     .TP
92     .BR xstep
93     The x axis step.
94     .TP
95     .BR ylabel
96     The y axis label.
97     .TP
98     .BR ymap
99     The y axis mapping function.
100     An y axis mapping ymap(y)=log(y) produces a log y axis.
101     .TP
102     .BR ymax
103     The y axis maximum.
104     .TP
105     .BR ymin
106     The y axis minimum.
107     .TP
108     .BR ystep
109     The y axis step.
110     .PP
111     In addition to the standard graph variables, each curve
112     has a set of variables.
113     The variables for curve 'A' all begin with the letter 'A';
114     the variables for curve 'B' all begin with the letter 'B',
115     and so on.
116     Up to 8 curves are supported on a single graph, 'A'
117     through 'H'.
118     The variables for curve 'A' are:
119     .TP 10n
120     .BR A
121     The function for curve 'A'.
122     If
123     .I Adata
124     is undefined,
125     .I xmin,
126     .I xmax
127     and
128     .I Anpoints
129     are used to determine which x values to plot.
130     If
131     .I Adata
132     is defined and
133     .I A
134     is a function of a single variable (ie. A(x)),
135     data values are interpreted as x values to be plotted.
136     If
137     .I Adata
138     is defined and
139     .I A
140     is a function of two variables (ie. A(x,y)),
141     data values are interpreted as (x,y) pairs and
142     .I A
143     becomes a mapping function for the data.
144     .TP
145     .BR Acolor
146     The color for curve A.
147     The values 1-4 map to black, red, green, and blue respectively.
148     A value of 0 turns curve A off.
149     .TP
150     .BR Adata
151     The point data for curve 'A'.
152     If
153     .I Adata
154     is set to the name of a file,
155     data is read and interpreted from that file.
156     If
157     .I Adata
158     is set to a command (beginning with an exclamation, '!'),
159     the output of the command is read as data.
160     Otherwise, data is read from the current file.
161     Data values are separated by white space and/or commas.
162     A semicolon or end of file indicates the end of data.
163     .TP
164     .BR Alabel
165     The label for curve 'A'.
166     The curve label is printed in the legend when a curve is defined.
167     .TP
168     .BR Alintype
169     The line type for curve 'A', valued from 0 to 4.
170     A value of 0 turns line drawing off.
171     A value of 1 is solid, 2 is dashed, 3 is dotted, and 4 is dot-dashed.
172     .TP
173     .BR Anpoints
174     The number of symbol points for curve 'A'.
175     If
176     .I Adata
177     is defined, all points will be connected with the selected
178     curve line, but only
179     .I Anpoints
180     points will be indicated with a symbol.
181     This prevents messy graphs when large number of points are defined.
182     If
183     .I A
184     is defined and
185     .I Adata
186     is not,
187     .I Anpoints
188     is used along with
189     .I xmin
190     and
191     .I xmax
192     to determine which x values to plot.
193     .TP
194     .BR Asymsize
195     The symbol radius for curve 'A'.
196     The default size is 100.
197     A value of 0 turns symbols off.
198     .TP
199     .BR Asymtype
200     This is the name of a segment in
201     .I symfile
202     which defines the graphics symbol for curve 'A'.
203     .TP
204     .BR Athick
205     The line thickness for curve 'A', valued from 0 to 4.
206     A thickness of 0 turns line drawing off.
207     .SH "GRAPH FILE FORMAT"
208     A graph file contains definitions for graph and curve
209     variables.
210     These definitions fall one per line in the following formats:
211     .nf
212    
213     vreal = expression # real variable
214     vfunction(x) = expression(x) # function
215     vstring = "string" # string variable
216     vdata = filename # data file
217     vdata = "!command" # data generator
218     variable = continued \\
219     line # newline escaped
220     vdata = # data
221     v1 v2 v3 v4 ... ;
222    
223     .fi
224     Comments are preceded by a '#', and continue to the end
225     of the line.
226     Except for comments, the newline can be escaped with a backslash.
227     Note that in the special case where data is contained in
228     the graph file, a definition will continue over more than
229     one line.
230     Data values can be separated by commas or white space, and
231     reading continues until a semicolon is reached.
232     No comments are allowed in the data section of a file.
233     .PP
234     An expression is an algebraic formula containing numbers,
235     variables, functions, and the standard operators
236 greg 1.3 {+,-,*,/,^,(,)} (see icalc(1)).
237 greg 1.1 Besides the variables described in the last section,
238     definitions of intermediate real variables and functions
239     are allowed for convenience.
240     They may be used in expressions of graph and curve variables.
241     .SH EXAMPLE
242     A file to graph the sine function is:
243     .nf
244    
245     title = "Sine Function from 0 to Pi"
246     PI = 3.141592653589793
247     A(x) = sin(x)
248     xmin = 0
249     xmax = PI
250     Anpoints = 100
251    
252     .fi
253     Or, to graph selected points:
254     .nf
255    
256     title = "Sine Function at 0, .2, .6, and .8"
257     A(x) = sin(x)
258     Adata =
259     0 , .2
260     .6 , .8
261     ;
262    
263     .fi
264     The commands to plot these files might be:
265     .nf
266    
267 greg 1.4 bgraph -line sine1.plt | psmeta | lpr
268 greg 1.1
269 greg 1.4 bgraph -curve +ymin -1 +ymax 1 sine2.plt | x11meta
270 greg 1.1
271     .fi
272     .SH FILES
273     /usr/local/lib/meta/*.mta
274     /usr/local/lib/meta/*.plt
275     *.plt
276     .SH AUTHOR
277     Greg Ward
278     .SH BUGS
279     There is no mechanism provided for undefining a variable.
280     An axis mapping function which is not invertible (monotonically
281     increasing or decreasing) confuses the program terribly.
282     .SH "SEE ALSO"
283 greg 1.4 dgraph(1), gcomp(1), icalc(1), igraph(1),
284     metafile(5), x11meta(1)