]> 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 SYNOPSIS
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 By default
31 .I fplot
32 draws coordinate axes and tick marks; the
33 .B -a
34 option inhibits this.
35 .PP
36 Each function to be plotted may be a combination of the independent variable x, 
37 the elementary operations (+, -, *, / and %), and the functions described in
38 .IR sin (2)
39 and
40 .IR exp (2).
41 The exception being that x^n raises x to the nth power, log is the base 10 logarithm, 
42 and ln is the natural logarithm.
43 .SH EXAMPLES
44 Plot the absolute value and x^3 functions to a 400x400 image(6) on standard output and view with
45 .IR page (1).
46 .IP
47 .EX
48 fplot -c -s 400x400 'sqrt(x*x)' 'x^3' | page
49 .EE
50 .SH SOURCE
51 .B /sys/src/cmd/fplot.c
52 .SH SEE ALSO
53 .IR exp (2),
54 .IR sin (2),
55 .IR image (6),
56 .IR plot (1).
57 .SH DIAGNOSTICS
58 .I Fplot
59 either exits with
60 .LR "syntax error"
61 or an empty status.
62 .SH BUGS
63 There is no unary plus or minus.
64 .PP
65 Axes are not drawn in
66 .B -c
67 output.
68 .SH HISTORY
69 .I Fplot
70 first appeared in 9front (July, 2011).