diff options
Diffstat (limited to 'man/man7/plot.html')
-rw-r--r-- | man/man7/plot.html | 386 |
1 files changed, 386 insertions, 0 deletions
diff --git a/man/man7/plot.html b/man/man7/plot.html new file mode 100644 index 00000000..ca64b3fd --- /dev/null +++ b/man/man7/plot.html @@ -0,0 +1,386 @@ +<head> +<title>plot(7) - Plan 9 from User Space</title> +<meta content="text/html; charset=utf-8" http-equiv=Content-Type> +</head> +<body bgcolor=#ffffff> +<table border=0 cellpadding=0 cellspacing=0 width=100%> +<tr height=10><td> +<tr><td width=20><td> +<tr><td width=20><td><b>PLOT(7)</b><td align=right><b>PLOT(7)</b> +<tr><td width=20><td colspan=2> + <br> +<p><font size=+1><b>NAME </b></font><br> + +<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + plot – graphics interface<br> + +</table> +<p><font size=+1><b>DESCRIPTION </b></font><br> + +<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Files of this format are interpreted by <a href="../man1/plot.html"><i>plot</i>(1)</a> to draw graphics + on the screen. A <i>plot</i> file is a UTF stream of instruction lines. + Arguments are delimited by spaces, tabs, or commas. Numbers may + be floating point. Punctuation marks (except <tt><font size=+1>:</font></tt>) , spaces, and + tabs at the beginning of lines are ignored. Comments run from + <tt><font size=+1>:</font></tt> to newline. Extra letters appended to a valid instruction are + ignored. Thus <tt><font size=+1>...line</font></tt>, <tt><font size=+1>line</font></tt>, <tt><font size=+1>li</font></tt> all mean the same thing. Arguments + are interpreted as follows:<br> + 1. If an instruction requires no arguments, the rest of the line + is ignored.<br> + 2. If it requires a string argument, then all the line after the + first field separator is passed as argument. Quote marks may be + used to preserve leading blanks. Strings may include newlines + represented as <tt><font size=+1>\n</font></tt>.<br> + 3. Between numeric arguments alphabetic characters and punctuation + marks are ignored. Thus <tt><font size=+1>line from 5 6 to 7 8</font></tt> draws a line from + (5, 6) to (7, 8).<br> + 4. Instructions with numeric arguments remain in effect until a + new instruction is read. Such commands may spill over many lines. + Thus the following sequence will draw a polygon with vertices + (4.5, 6.77), (5.8, 5.6), (7.8, 4.55), and (10.0, 3.6).<br> + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + <tt><font size=+1>move 4.5 6.77<br> + vec 5.8, 5.6 7.8<br> + 4.55 10.0, 3.6 4.5, 6.77<br> + + <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table> + </font></tt> + + </table> + The instructions are executed in order. The last designated point + in a <tt><font size=+1>line</font></tt>, <tt><font size=+1>move</font></tt>, <tt><font size=+1>rmove</font></tt>, <tt><font size=+1>vec</font></tt>, <tt><font size=+1>rvec</font></tt>, <tt><font size=+1>arc</font></tt>, or <tt><font size=+1>point</font></tt> command becomes + the ‘current point’ (<i>X,Y</i>) for the next command.<br> + <p><font size=+1><b>Open & Close </b></font><br> + <tt><font size=+1>o</font></tt> <i>string</i> Open plotting device. For <i>troff</i>, <i>string</i> specifies the + size of the plot (default is <tt><font size=+1>6i</font></tt>).<br> + <tt><font size=+1>cl</font></tt> Close plotting device.<br> + <p><font size=+1><b>Basic Plotting Commands </b></font><br> + <tt><font size=+1>e</font></tt> Start another frame of output.<br> + <tt><font size=+1>m</font></tt> <i>x y</i> (move) Current point becomes <i>x y.<br> + </i><tt><font size=+1>rm</font></tt> <i>dx dy</i>Current point becomes <i>X+dx Y+dy.<br> + </i><tt><font size=+1>poi</font></tt> <i>x y</i>Plot the point <i>x y</i> and make it the current point.<br> + <tt><font size=+1>v</font></tt> <i>x y</i> Draw a vector from the current point to <i>x y.<br> + </i><tt><font size=+1>rv</font></tt> <i>dx dy</i>Draw vector from current point to X<i>+</i>dx Y<i>+</i>dy<br> + <tt><font size=+1>li</font></tt> <i>x1 y1 x2 y2<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a line from <i>x1 y1</i> to <i>x2 y2.</i> Make the current point <i>x2 y2.<br> + </i> + </table> + + </table> + <tt><font size=+1>t</font></tt> <i>string</i> Place the <i>string</i> so that its first character is centered + on the current point (default). If <i>string</i> begins with <tt><font size=+1>\C</font></tt> (<tt><font size=+1>\R</font></tt>), + it is centered (right-adjusted) on the current point. A backslash + at the beginning of the string may be escaped with another backslash.<br> + <tt><font size=+1>a</font></tt> <i>x1 y1 x2 y2 xc yc r<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a circular arc from <i>x1 y1</i> to <i>x2 y2</i> with center <i>xc yc</i> and + radius <i>r</i>. If the radius is positive, the arc is drawn counterclockwise; + negative, clockwise. The starting point is exact but the ending + point is approximate.<br> + + </table> + + </table> + <tt><font size=+1>ci</font></tt> <i>xc yc r<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a circle centered at <i>xc yc</i> with radius <i>r</i>. If the range and + frame parameters do not specify a square, the ‘circle’ will be + elliptical.<br> + + </table> + + </table> + <tt><font size=+1>di</font></tt> <i>xc yc r<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a disc centered at <i>xc yc</i> with radius <i>r</i> using the filling + color (see <tt><font size=+1>cfill</font></tt> below).<br> + + </table> + + </table> + <tt><font size=+1>bo</font></tt> <i>x1 y1 x2 y2<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a box with lower left corner at <i>x1 y1</i> and upper right corner + at <i>x2 y2.<br> + </i> + </table> + + </table> + <tt><font size=+1>sb</font></tt> <i>x1 y1 x2 y2<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a solid box with lower left corner at <i>x1 y1</i> and upper right + corner at <i>x2 y2</i> using the filling color (see <tt><font size=+1>cfill</font></tt> below).<br> + + </table> + + </table> + <tt><font size=+1>par</font></tt> <i>x1 y1 x2 y2 xg yg<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a parabola from <i>x1 y1</i> to <i>x2 y2</i> ‘guided’ by <i>xg yg.</i> The parabola + passes through the midpoint of the line joining <i>xg yg</i> with the + midpoint of the line joining <i>x1 y1</i> and <i>x2 y2</i> and is tangent to + the lines from <i>xg yg</i> to the endpoints.<br> + + </table> + + </table> + <tt><font size=+1>pol { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw polygons with vertices <i>x1 y1 ... xn yn</i> and <i>X1 Y1 ... Xm Ym.</i> + If only one polygon is specified, the inner brackets are not needed.<br> + + </table> + + </table> + <tt><font size=+1>fi { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Fill a polygon. The arguments are the same as those for <tt><font size=+1>pol</font></tt> except + that the first vertex is automatically repeated to close each + polygon. The polygons do not have to be connected. Enclosed polygons + appear as holes.<br> + + </table> + + </table> + <tt><font size=+1>sp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with simple + endpoints.<br> + + </table> + + </table> + <tt><font size=+1>fsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double + first endpoint.<br> + + </table> + + </table> + <tt><font size=+1>lsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double + last endpoint.<br> + + </table> + + </table> + <tt><font size=+1>dsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double + endpoints.<br> + + </table> + + </table> + <tt><font size=+1>csp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br> + in</font></tt> <i>filename<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + (include) Take commands from <i>filename</i>.<br> + + </table> + + </table> + <tt><font size=+1>de</font></tt> <i>string</i> <tt><font size=+1>{</font></tt> <i>commands</i> <tt><font size=+1>}<br> + </font></tt> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Define <i>string</i> as <i>commands</i>.<br> + + </table> + + </table> + <tt><font size=+1>ca</font></tt> <i>string scale<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Invoke commands defined as <i>string</i> applying <i>scale</i> to all coordinates.<br> + + </table> + + </table> + <p><font size=+1><b>Commands Controlling the Environment </b></font><br> + <tt><font size=+1>co</font></tt> <i>string<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Use color given by first character of <i>string</i>, one of <tt><font size=+1>red</font></tt>, <tt><font size=+1>yellow</font></tt>, + <tt><font size=+1>green</font></tt>, <tt><font size=+1>blue</font></tt>, <tt><font size=+1>cyan</font></tt>, <tt><font size=+1>magenta</font></tt>, <tt><font size=+1>white</font></tt>, and <tt><font size=+1>kblack</font></tt>. If <i>string</i> begins + with a digit, it is taken to be a 32-bit number specifying 8 bit + each of red, green, blue, and alpha. For example, <tt><font size=+1>0xFFFF00FF</font></tt> denotes + solid yellow. + + </table> + + </table> + <tt><font size=+1>pe</font></tt> <i>string<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Use <i>string</i> as the style for drawing lines. The available pen styles + are: <tt><font size=+1>solid</font></tt>, <tt><font size=+1>dott</font></tt>[ed], <tt><font size=+1>short</font></tt>, <tt><font size=+1>long</font></tt>, <tt><font size=+1>dotd</font></tt>[ashed]<tt><font size=+1>, cdash</font></tt>, <tt><font size=+1>ddash<br> + </font></tt> + </table> + + </table> + <tt><font size=+1>cf</font></tt> <i>string<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Color for filling (see <tt><font size=+1>co</font></tt>, above).<br> + + </table> + + </table> + <tt><font size=+1>ra</font></tt> <i>x1 y1 x2 y2<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + The data will fall between <i>x1 y1</i> and <i>x2 y2.</i> The plot will be magnified + or reduced to fit the device as closely as possible.<br> + Range settings that exactly fill the plotting area with unity + scaling appear below for devices supported by the filters of <a href="../man1/plot.html"><i>plot</i>(1)</a>. + The upper limit is just outside the plotting area. In every case + the plotting area is taken to be square; points outside may be + displayable on devices with nonsquare faces. + + </table> + + </table> + <tt><font size=+1>fr</font></tt> <i>px1 py1 px2 py2<br> + </i> + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + + <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + Plot the data in the fraction of the display specified by <i>px1 + py1</i> for lower left corner and <i>px2 py2</i> for upper right corner. + Thus <tt><font size=+1>frame .5 0 1. .5</font></tt> plots in the lower right quadrant of the + display; <tt><font size=+1>frame 0. 1. 1. 0.</font></tt> uses the whole display but inverts + the <i>y</i> coordinates.<br> + + </table> + + </table> + <tt><font size=+1>sa</font></tt> Save the current environment, and move to a new one. The new + environment inherits the old one. There are 7 levels.<br> + <tt><font size=+1>re</font></tt> Restore previous environment.<br> + +</table> +<p><font size=+1><b>SEE ALSO </b></font><br> + +<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td> + + <a href="../man1/plot.html"><i>plot</i>(1)</a>, <a href="../man1/graph.html"><i>graph</i>(1)</a><br> + +</table> + +<td width=20> +<tr height=20><td> +</table> +<!-- TRAILER --> +<table border=0 cellpadding=0 cellspacing=0 width=100%> +<tr height=15><td width=10><td><td width=10> +<tr><td><td> +<center> +<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a> +</center> +</table> +<!-- TRAILER --> +</body></html> |