]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/fplot
merge
[plan9front.git] / sys / man / 1 / fplot
1 .TH FPLOT 1
2 .SH NAME
3 fplot \- plot elementary function
4 .SH SYNOPSYS
5 .B fplot
6 [
7 .B -c
8 [
9 .B -s
10 .I size
11 ]] [
12 .B -r
13 .I range
14 ]
15 .I functions ...
16 .SH DESCRIPTION
17 .I Fplot
18 plots elementary
19 .I functions
20 separated by spaces. The default output is the screen, but if the
21 .B -c
22 option is specified, the plot is written to the standard output as an r8g8b8
23 .IR image (6).
24 The latter image size is either 640x480 or the one specified by the
25 .B -s
26 option's argument (in the WIDTHxHEIGHT format). The
27 .B -r
28 option accepts as argument the x and y ranges, in the format
29 .LR "xmin:xmax ymin:ymax".
30 .PP
31 Each function to be plotted may be a combination of the independent variable x, 
32 the elementary operations (+, -, *, / and %), and the functions described in
33 .IR sin (2)
34 and
35 .IR exp (2).
36 The exception being that x^n raises x to the nth power, log is the base 10 logarithm, 
37 and ln is the natural logarithm.
38 .SH EXAMPLES
39 Plot the absolute value and x^3 functions to a 400x400 image(6) on standard output and view with
40 .IR page (1).
41 .IP
42 .EX
43 fplot -c -s 400x400 'sqrt(x*x)' 'x^3' | page
44 .EE
45 .SH SOURCE
46 .B /sys/src/cmd/fplot.c
47 .SH SEE ALSO
48 .IR exp (2),
49 .IR sin (2),
50 .IR image (6),
51 .IR plot (1).
52 .SH DIAGNOSTICS
53 .I Fplot
54 either exits with
55 .LR "syntax error"
56 or an empty status.
57 .SH HISTORY
58 .I Fplot
59 first appeared in 9front (July, 2011).