FPLOT(1) FPLOT(1) NAME fplot - plot elementary function SYNOPSIS fplot [ -c [ -s size ]] [ -r range ] functions ... DESCRIPTION Fplot plots elementary functions separated by spaces. The default output is the screen, but if the -c option is speci- fied, the plot is written to the standard output as an r8g8b8 image(6). The latter image size is either 640x480 or the one specified by the -s option's argument (in the WIDTHxHEIGHT format). The -r option accepts as argument the x and y ranges, in the format `xmin:xmax ymin:ymax'. By default fplot draws coordinate axes and tick marks; the -a option inhibits this. Each function to be plotted may be a combination of the independent variable x, the elementary operations (+, -, *, / and %), and the functions described in sin(2) and exp(2). The exception being that x^n raises x to the nth power, log is the base 10 logarithm, and ln is the natural logarithm. EXAMPLES Plot the absolute value and x^3 functions to a 400x400 image(6) on standard output and view with page(1). fplot -c -s 400x400 'sqrt(x*x)' 'x^3' | page SOURCE /sys/src/cmd/fplot.c SEE ALSO exp(2), sin(2), image(6), plot(1). DIAGNOSTICS Fplot either exits with `syntax error' or an empty status. BUGS There is no unary plus or minus. Axes are not drawn in -c output. HISTORY Fplot first appeared in 9front (July, 2011).