Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/drawvars/drawvars.man

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH SNMPFS 4
.SH NAME
drawvars \- Tool to draw positive functions into image files
.SH SYNOPSIS
.B drawvars
[
.B -T
] [
.B -t
.I title
] [
.B -s
.I x start
] [
.B -e
.I x end
] [
.B -m
.I y max
] [
.B -v
.I var1,var2,var3
]
.PP
.SH DESCRIPTION
.PP
.I Drawvars 
is a little cousin of gview(1). It has been created to be able to write representation of positive functions to files. It writes to stdout an image(6) data to be piped to external programs such as page(1) or topng(1).
.PP
.SH USAGE
.PP
.TP
.B -T
 interprets x axis as a time value to use with time series values
.TP
.B -t
specify a title to the image
.TP
.B -s
specify the minimun x value
.TP
.B -e
specify the maximun x value
.TP
.B -m
specify the maximun y value (y minimun is always 0)
.TP
.B -v
specify the captions to identify each function values
.PP
To see the format drawvars can read values, take a look at the samples.

.SH EXAMPLES
This command writes the rand() and rand()^2 distribution:
.PP
.EX
	awk 'BEGIN{
		for(x=0;x<100;x++)  { 
			print x " " 100*rand() " " 100*(rand()*rand())  
		}
	}' | 8.out -t 'awk rand() distribution' -s 0 -e 100 -m 120 -v x,'rand()','rand()^2' | topng > sample.png
.EE
saving the result as a png image in sample.png
.PP
This sample draws the positive values of the sin of (x) scaled to fit the window (like the sample of gview(1)):
.PP
.EX
	awk 'BEGIN{
		for(x=.1;x<500;x+=.1)
			print x,sin(x)*100/x
	}' | 8.out -t sin -s 0 -e 500 -m 100 -v x,sin | page
.EE
and uses page to display it on the screen
.PP
.SH FILES
.B /$objtype/bin/aux/drawvars
.PP
.B /sys/man/4/drawvars
.PP
.B /lib/ndb/snmp
.PP
.SH SOURCE
.B /n/sources/contrib/gabidiaz/drawvars.tgz
.SH BUGS
A complete implementation of gview features should be done, at least, autoscale and support for negative functions. 
.I gabidiaz@gmail.com.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.