336 lines · 6.6 KB · Text
RawDownload
.TH PLOT 6.SH NAMEplot \- graphics interface.SH DESCRIPTIONFiles of this format are interpreted by.IR  plot (1)to draw graphics on the screen.A.I plotfile is a.SM UTFstream ofinstruction lines.Arguments are delimited by spaces, tabs, or commas.Numbers may be floating point.Punctuation marks (except .LR : ),spaces, and tabs at the beginning of lines are ignored.Comments run from  .L :to newline.Extra letters appended to a valid instruction are ignored.Thus.LR ...line ,.LR line , and .L liall mean the same thing.Arguments are interpreted as follows:.TP1.If an instruction requires no arguments, the rest of the line is ignored..TP2.If it requires a string argument, then all the lineafter the first field separator is passed as argument.Quote marks may be used to preserve leading blanks.Strings may include newlines represented as.LR \en ..TP3.Between numeric arguments alphabetic characters andpunctuation marks are ignored.Thus.Lline from 5 6 to 7 8draws a line from (5, 6) to (7, 8)..TP4.Instructions with numeric arguments remain in effect untila new instruction is read.Such commands may spill over many lines. Thusthe following sequence will draw a polygonwith vertices(4.5, 6.77), (5.8, 5.6), (7.8, 4.55), and (10.0, 3.6)..IP.EXmove 4.5 6.77vec 5.8, 5.6 7.84.55 10.0, 3.6 4.5, 6.77.EE.PPThe instructions are executed in order.The last designated point in a.BR line ", " move ", " rmove ,.BR vec ", " rvec ", " arc ,or.B pointcommand becomes the `current point'.RI ( X,Y )for the next command..SS "Open & Close".PD0.TP 10.BI o " string"Open plotting device.For .IR troff ,.I stringspecifies the size of the plot(default is.LR 6i )..TP 10.B clClose plotting device..PD.SS "Basic Plotting Commands".PD0.TP 10.B eStart another frame of output..TP 10.BI m " x y"(move) Current point becomes.I "x y.".TP 10.BI rm " dx dy"Current point becomes.I "X+dx Y+dy.".TP 10.BI poi " x y"Plot the point.I "x y"and make it the current point..TP 10.BI v " x y"Draw a vector from the current point to.I "x y.".TP 10.BI rv " dx dy"Draw vector from current point to.RI X + dx.RI Y + dy.TP 10.BI li " x1 y1 x2 y2"Draw a line from.I "x1 y1"to.I "x2 y2."Make the current point.I "x2 y2.".TP 10.BI t " string"Place the.I stringso that itsfirst character is centered on the current point (default).If.I stringbegins with.L \eC.RL ( \eR ),it is centered (right-adjusted) on the current point.A backslash at the beginning of the string maybe escaped with another backslash..TP 10.BI a " x1 y1 x2 y2 xc yc r"Draw a circular arc from.I "x1 y1"to.I "x2 y2"with center.I "xc yc"and radius.IR r .If the radius is positive, the arc is drawn counterclockwise;negative, clockwise.The starting point is exact but the ending point is approximate..TP 10.BI ci " xc yc r"Draw a circle centered at.I "xc yc"with radius.IR r .If the range and frame parameters do not specify a square,the `circle' will be elliptical..TP 10.BI di " xc yc r"Draw a disc centered at.I "xc yc"with radius.I rusing the filling color (see .B cfillbelow)..TP 10.BI bo " x1 y1 x2 y2"Draw a box with lower left corner at.I "x1 y1"and upper right corner at.I "x2 y2.".TP 10.BI sb " x1 y1 x2 y2"Draw a solid box with lower left corner at.I "x1 y1"and upper right corner at.I "x2 y2"using the filling color (see .B cfillbelow)..TP 10.BI par " x1 y1 x2 y2 xg yg"Draw a parabola from.I "x1 y1"to.I "x2 y2"`guided' by.I "xg yg."The parabola passes through the midpoint of the line joining.I "xg yg"with the midpoint of the linejoining.I "x1 y1"and.I "x2 y2"and is tangent to the lines from.I "xg yg"to the endpoints..TP 10.BI "pol { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"Draw polygons with vertices.I "x1 y1 ... xn yn"and.I "X1 Y1 ... Xm Ym."If only one polygon is specified, the inner brackets arenot needed..TP 10.BI "fi { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"Fill a polygon.The arguments are the same as those for.B polexcept that the first vertex is automatically repeated toclose each polygon.The polygons do not have to be connected.Enclosed polygons appear as holes..TP 10.BI "sp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"Draw a parabolic spline guided by.I "x1 y1 ... xn yn"with simple endpoints..TP 10.BI "fsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"Draw a parabolic spline guided by.I "x1 y1 ... xn yn"with double first endpoint..TP 10.BI "lsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"Draw a parabolic spline guided by.I "x1 y1 ... xn yn"with double last endpoint..TP 10.BI "dsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"Draw a parabolic spline guided by.I "x1 y1 ... xn yn"with double endpoints..TP 10.BI "csp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI".TP 10.BI in " filename"(include) Take commands from.IR filename ..TP 10.BI de " string " { " commands " }Define.I stringas.IR commands ..TP 10.BI ca " string scale"Invoke commands defined as.I stringapplying.I scaleto all coordinates..PD.SS "Commands Controlling the Environment".PD0.TP 10.BI co " string"Use color given by first character of.IR string ,one of.BR red ,.BR yellow ,.BR green ,.BR blue ,.BR cyan ,.BR magenta ,.BR white ,and.BR kblack ..TP 10.BI pe " string"Use.I stringas the style for drawing lines.The available pen styles are:.BR solid ,.BR  dott [ed],.BR short ,.BR long ,.BR dotd [ashed] ,.BR cdash ,.BR ddash.TP 10.BI cf " string"Color for filling (see.BR co ,above)..TP 10.BI ra " x1 y1 x2 y2"The data will fall between.I "x1 y1"and.I "x2 y2."The plot will be magnified or reduced to fitthe device as closely as possible..IPRange settings that exactly fill the plotting areawith unity scaling appear below fordevices supported by the filters of.IR  plot (1).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 ondevices with nonsquare faces..TP 10.BI fr " px1 py1 px2 py2"Plot the data in the fraction of the displayspecified by.I "px1 py1"for lower left cornerand.I "px2 py2"for upper right corner.Thus  .L frame .5 0 1. .5plots in the lower rightquadrant of the display;.L frame 0. 1. 1. 0.uses the whole display butinverts the.I ycoordinates..TP 10.B saSave the current environment, and move to a new one.The new environment inherits the old one.There are 7 levels..TP 10.B reRestore previous environment..PD.SH "SEE ALSO".IR plot (1), .IR graph (1)