Debian Codegraph @

texmf-dist/doc/generic/mfpic/mfpcard.tex

raw
1 % File: mfpcard.tex
2 % A part of mfpic 1.10 2012/12/03
3 %
4 % (Ask your driver to print so that longer dimension is horizontal.)
5 \newdimen\paperlongside
6 \paperlongside 11 truein
7 \newdimen\papershortside
8 \papershortside 8.5 truein
9
10 \ifx\pdfoutput\undefined
11 \else\ifx\pdfoutput\relax
12 \else\ifnum\pdfoutput>0
13 \pdfpagewidth\paperlongside
14 \pdfpageheight\papershortside
15 \fi\fi\fi
16
17 \font\manual=cmcsc8
18 \def\MF{{\manual meta}\-{\manual font}}
19 \def\MP{{\manual meta}\-{\manual post}}
20 \def\TeX{{\rm T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\null}}
21 \def\plainTeX{{\rm plain\kern -.15em\TeX}}
22 \def\LaTeX{{\rm L\raise.42ex\hbox{\kern-.36em \manual a}\kern-.15em\TeX}}
23 %\def\LaTeXe{\LaTeX$2_{\textstyle\varepsilon}$}
24 \def\gobble#1{}
25 \def\bsl{{\tt\char\escapechar}}
26
27 \def\cs#1{{\tt\char`\\#1}}
28 \def\marg#1{{\tt\char`\{#1\char`\}}}
29 \def\oarg#1{{\tt[#1]}}
30 \def\parg#1{{\tt(#1)}}
31
32 % logical markup to typeset filenames, program names, MF code,
33 % grafbase identifiers, environment names, email addresses, and
34 % emphasis.
35 \def\file#1{{\tt #1}}
36 \def\prog#1{{\sf #1}} % didn't want everything in \tt
37 \def\mfc#1{{\tt #1}}
38 \def\opt#1{{\tt #1}} % LaTeX2e option names
39 \def\gbc#1{{\tt #1}}
40 \def\env#1{{\tt #1}}
41 \def\mail#1{{\tt #1}}
42 \def\emph#1{{\it #1\/}}
43
44 % Forced, Clean, Linebreak.
45
46 \def\brk{\nobreak\hfil\break}
47
48 \newcount\columnsperpage
49
50 % Entries are too wide for 3 columns. Print 2 columns landscape
51 \columnsperpage=2
52
53 % The rest of this header is nicked from gnuplot (which took it from
54 % Emacs) but was drastically adapted for mfpic.
55 %
56 % This file is intended to be processed by plainTeX.
57 %
58 % You will need to inform your dvi driver to print it in landscape
59 % and, optionally, double sided.
60 % Author of GNU Emacs Refcard:
61 % Stephen Gildea
62 % UUCP: mit-erl!gildea
63 % Internet: [email protected]
64 %
65 % Person who ripped off the formatter for gnuplot:
66 % Alex Woo
67 % NASA Ames Research Center
68 % Internet: [email protected]
69 %
70 % Modified on 9 Dec 1992 by:
71 % Daniel S. Lewart
72 % University of Illinois
73 % Internet: [email protected]
74 %
75 % Modified on 29 Sep 1999, 11 Jul 2002, 29 Sep 2003 (for mfpic) by:
76 % Daniel H. Luecking
77 % University of Arkansas
78 % [email protected]
79
80 \newdimen\intercolumnskip
81 \newbox\columna
82 \newbox\columnb
83
84 \hsize4.75truein
85 \vsize 7.25truein
86
87 % Equal left right, right and middle margins, about .5in on USletter
88 \intercolumnskip=\paperlongside
89 \advance\intercolumnskip -2\hsize
90 \intercolumnskip .33333\intercolumnskip
91 \hoffset\intercolumnskip
92 \advance\hoffset -1truein
93
94 % Equal top and bottom margins, about .4in on A4 paper
95 \voffset\papershortside
96 \advance\voffset-\vsize
97 \voffset .5\voffset
98 \advance\voffset -1truein
99
100 \topskip8truept
101
102 \font\manual=cmcsc10 at 8pt
103 \font\titlefont=cmbx10 scaled \magstep1
104 \font\headingfont=cmbx10
105 \font\smallfont=cmr6
106 \font\smallsy=cmsy6
107 \font\eighti=cmmi8
108 \font\sixi=cmmi6
109 \font\eightex=cmex10 at 8pt
110 \font\eightrm=cmr8
111 \font\eightbf=cmbx8
112 \let\subheadingfont\eightbf
113 \font\sixbf=cmbx6
114 \font\eightit=cmti8
115 \font\eighttt=cmtt8
116 \font\eightsy=cmsy8
117 \font\sixsy=cmsy6
118 \font\eightsf=cmss10 at 8pt
119 \font\eightsl=cmsl8
120 \font\tensf=cmss10
121 \textfont0=\eightrm \scriptfont0=\smallfont
122 \textfont1=\eighti \scriptfont1=\sixi
123 \textfont2=\eightsy \scriptfont2=\sixsy
124 \textfont3=\eightex \scriptfont3=\eightex \scriptscriptfont3=\eightex
125 \textfont\bffam\eightbf \scriptfont\bffam\sixbf
126 \def\rm{\fam0\eightrm}
127 \def\bf{\fam\bffam\eightbf}
128 \def\it{\eightit}
129 \def\tt{\eighttt}
130 \def\sf{\eightsf}
131 \def\sl{\eightsl}
132 \smallskipamount 2pt plus 1pt minus 0pt
133 \medskipamount 5pt plus 2pt minus 2pt
134 \bigskipamount 10pt plus 3pt minus 3pt
135 \normalbaselineskip=10pt
136 \normalbaselines
137 \rm
138 \setbox\strutbox=\hbox{\vrule height6.8pt depth3.2pt width0pt}
139
140 \def\abc{a}
141 \output={%
142 \if b\abc \multicolumnformat \global\def\abc{a}
143 \else\if a\abc
144 \global\setbox\columna\columnbox \global\def\abc{b}
145 \global\setbox\columnb\hbox to -\intercolumnskip{}
146 \fi\fi}
147 \def\multicolumnformat{\shipout\vbox{%
148 \hbox{\box\columna\hskip\intercolumnskip
149 \box\columnb\hskip\intercolumnskip\columnbox}}\advancepageno}
150 \def\columnbox{\leftline{\pagebody}}
151
152 \def\bye{\par\vfill\supereject
153 \if a\abc \else\null\vfill\eject\fi
154 \if a\abc \else\null\vfill\eject\fi
155 \end}
156
157 % Typewriter type braces (redefinitions of escaped braces) :
158 \def\{{{\tt \char`\{}}
159 \def\}{{\tt\char`\}}}
160
161
162 \parindent 0pt
163
164 \def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
165
166 \def\section#1{\par
167 \penalty-100
168 \vskip 2.25ex plus 2ex minus 2ex {\headingfont #1}%
169 \par \nobreak
170 \vskip 1.25ex plus 1ex minus 1.5ex}
171
172 \def\subsection#1{\par
173 \ifdim\lastskip<1.5ex
174 \vskip -\lastskip
175 \vskip 1.5ex plus 1ex minus 1ex
176 \fi
177 {\subheadingfont #1}%
178 \par \nobreak
179 \vskip .75ex plus .5ex minus .5ex}
180
181 \newdimen\describeindent
182 \describeindent=0em
183
184 \def\meta#1{$\langle\hbox{\it #1\/}\rangle$}
185 \def\alt{\unskip$\;|\;$\hfilbreak}
186 \def\hfilbreak{\hfil\allowbreak\hfilneg}
187
188 \newdimen\secondkeyindent
189
190 \def\describe#1#2{\leavevmode\vtop
191 {\hsize=\firstkeyfrac\hsize\rightskip=1em plus 1 fill\relax
192 \secondkeyindent\describeindent \advance\secondkeyindent 1em
193 \hangindent\secondkeyindent \hangafter1
194 \hskip\describeindent\relax\strut#1\nobreak\hskip0pt\strut}%
195 \vtop
196 {\hsize=\secondkeyfrac\hsize\rightskip=0pt plus 1 fill\relax
197 \leavevmode\strut#2\unskip\strut}\par}
198 \def\code#1{{\sf #1}}
199
200 \title{MFPIC Quick Reference}
201
202 \centerline{(Copyright 2000--2012 by Daniel Luecking)}
203 \medskip
204 This information was prepared for version 1.10 of \prog{mfpic}.
205
206 \section{Preamble commands}
207
208 \def\firstkeyfrac{.4}
209 \def\secondkeyfrac{.6}
210
211 \describe{Load \prog{mfpic} package (\LaTeX)}
212 {\cs{usepackage}\oarg{\meta{options}}\marg{mfpic}}
213 \describe{Options}{\opt{metafont} \alt \opt{metapost}, \opt{mplabels},
214 \opt{overlaylabels}, \opt{centeredcaptions},
215 \opt{raggedcaptions}, \opt{clip}, \opt{truebbox}, \opt{draft},
216 \opt{final}, \opt{nowrite}, \opt{mfpreadlog}}
217 \describe{Load \prog{mfpic}; activate options (\plainTeX)}
218 {\cs{input} \file{mfpic}. \cs{usemetafont} \alt
219 \cs{usemetapost}, \cs{usemplabels}, \cs{overlaylabels}
220 \cs{usecenteredcaptions}, \cs{useraggedcaptions},
221 \cs{clipmfpic}, \cs{usetruebbox}, \cs{mfpicdraft},
222 \cs{mfpicfinal}, \cs{mfpicnowrite}, \cs{mfpreadlog}}
223 \describe{Turn off some options}
224 {\cs{nomplabels}, \cs{nooverlaylabels},
225 \cs{nocenteredcaptions}, \cs{noraggedcaptions}, \cs{noclipmfpic},
226 \cs{notruebbox}}
227 \describe{Set up/close the output file}
228 {\cs{opengraphsfile}\marg{\meta{base name}}$\ldots$\cs{closegraphsfile}}
229
230 \section{The {\tensf mfpic} environment}
231
232 \def\firstkeyfrac{.30}
233 \def\secondkeyfrac{.70}
234
235 \describe{Start an \prog{mfpic} figure}
236 {\cs{mfpic}\oarg{\meta{xscale}}\oarg{\meta{yscale}}%
237 \marg{\meta{$x_{\min}$}}\allowbreak\marg{\meta{$x_{max}$}}\allowbreak
238 \marg{\meta{$y_{min}$}}\allowbreak\marg{\meta{$y_{max}$}}\brk
239 \null\quad\meta{mfpic commands}\brk
240 \cs{endmfpic}}
241 \describe{\quad\LaTeX{} (optional)}
242 {\cs{begin}\marg{mfpic}${}\equiv{}$\cs{mfpic},
243 \cs{end}\marg{mfpic}${}\equiv{}$\cs{endmfpic}}
244
245
246 \section{Dimensions (lengths)}
247
248 \def\firstkeyfrac{.58}
249 \def\secondkeyfrac{.42}
250
251 \describe{\sl Purpose; where used:} {\sl Name and default value:}
252 \vskip1pt
253 \describe{Unit of length; \cs{mfpic}} {\cs{mfpicunit}, \tt 1pt}
254 \describe{Size of a symbol; \cs{point}, \cs{plot}, and \cs{plotsymbol}}
255 {\cs{pointsize}, \tt 2pt}
256 \describe{Darkness of shading; \cs{shade}} {\cs{shadespace}, \tt 1pt }
257 \describe{Space between dots; \cs{polkadot}}
258 {\cs{polkadotspace}, \tt 10pt}
259 \describe{Space between hatch lines; hatching macros}
260 {\cs{hatchspace}, \tt 3pt}
261 \describe{Size of arrowhead; \cs{arrow}} {\cs{headlen}, \tt 3pt}
262 \describe{Size of x-, y-axis arrowhead; xy-axes macros}
263 {\cs{axisheadlen}, \tt 5pt}
264 \describe{Size of border axis arrowhead; side axis macros}
265 {\cs{sideheadlen}, \tt 0pt}
266 \describe{Size of marks on axes; axis marks} {\cs{hashlen}, \tt 4pt}
267 \describe{Size of dashes; \cs{dashed}} {\cs{dashlen}, \tt 4pt}
268 \describe{Space between dashes; \cs{dashed}} {\cs{dashspace}, \tt 4pt}
269 \describe{Size of dots; \cs{dotted}} {\cs{dotsize}, \tt 0.5pt}
270 \describe{Space between dots; \cs{dotted}} {\cs{dotspace}, 3pt}
271 \describe{Space between symbols; \cs{plot}} {\cs{symbolspace}, \tt 5pt}
272
273 \medskip
274 The following commands are used to change the size of some dimension
275 parameters:
276
277 \smallskip
278 \describe{{\sl Purpose} ({\sl default\/}):} {\sl Command:}
279 \vskip1pt
280 \describe{Set diameter of drawing pen ({\tt 0.5pt})}
281 {\cs{penwd}\marg{\meta{dimen}}}
282 \describe{Set diameter of shading dots ({\tt 0.5pt})}
283 {\cs{shadewd}\marg{\meta{dimen}}}
284 \describe{Set diameter of polkadot ({\tt 5pt})}
285 {\cs{polkadotwd}\marg{\meta{dimen}}}
286 \describe{Set diameter of hatching pen ({\tt 0.5pt})}
287 {\cs{hatchwd}\marg{\meta{dimen}}}
288 \describe{Multiply \cs{shadespace} by 1.2} {\cs{lightershade}}
289 \describe{Divide \cs{shadespace} by 1.2} {\cs{darkershade}}
290
291 %\vfil\eject
292 \section{Colors}
293
294 \def\firstkeyfrac{.45}
295 \def\secondkeyfrac{.55}
296
297 \smallskip
298 \describe{Set color for curves} {\cs{drawcolor}\marg{\meta{color}}}
299 \describe{Set color for fills} {\cs{fillcolor}\marg{\meta{color}}}
300 \describe{Set color for points, symbols} {\cs{pointcolor}\marg{\meta{color}}}
301 \describe{Set color for hatching} {\cs{hatchcolor}\marg{\meta{color}}}
302 \describe{Set color for arrowheads} {\cs{headcolor}\marg{\meta{color}}}
303 \describe{Set color for tlabels} {\cs{tlabelcolor}\marg{\meta{color}}}
304 \describe{Set color used by \cs{gclear}} {\cs{backgroundcolor}\marg{\meta{color}}}
305 \describe{\quad \LaTeX{} syntax}
306 {\cs{drawcolor}\oarg{\meta{model}}\marg{\meta{clrspec}}, etc.}
307 \describe{Define a color name} {\cs{mfpdefinecolor}\marg{\meta{name}}\marg{\meta{model}}\marg{\meta{clrspec}}}
308
309
310 \section{Common geometric figures}
311
312 Drawing commands that operate on a variable length list in braces may
313 be followed by \cs{datafile}\marg{\meta{filename}} instead of the list.
314
315 \subsection{Points}
316
317 \def\firstkeyfrac{.42}
318 \def\secondkeyfrac{.58}
319
320 \describe{Place a symbol at given point(s)}
321 {\cs{plotsymbol}\oarg{\meta{size}}\marg{\meta{name}}%
322 \marg{($x_0,y_0$),($x_1,y_1$),$\ldots$}}
323 \describe{\quad Available symbol names} {{\tt Triangle}, {\tt Square}, {\tt Circle}, {\tt
324 Diamond}, {\tt Star}, {\tt SolidTriangle}, {\tt SolidSquare}, {\tt SolidCircle},
325 {\tt SolidDiamond}, \tt{SolidStar}, {\tt Plus}, {\tt Cross},
326 {\tt Asterisk}}
327 \describe{Points (filled or unfilled circles)}
328 {\cs{point}\oarg{\meta{size}}\marg{($x_0,y_0$),($x_1,y_1$),$\ldots$}}
329 \describe{Force filled/open circles in \cs{point}:}
330 {\cs{pointfilltrue}/\cs{pointfillfalse}}
331
332 \subsection{Lines}
333
334 \def\firstkeyfrac{.45}
335 \def\secondkeyfrac{.55}
336
337 \describe{Connect points with lines}
338 {\cs{polyline}\marg{($x_0,y_0$),($x_1,y_1$),$\ldots$},
339 or (\cs{lines})}
340 \describe{Closed polygon}
341 {\cs{polygon}\marg{($x_0,y_0$),($x_1,y_1$),$\ldots$}}
342 \describe{Concatenate vectors}
343 {\cs{turtle}\marg{\meta{initialpoint},\meta{$v_1$},\meta{$v_2$},$\ldots$}}
344 \describe{Rectangle (upright) with given corners}
345 {\cs{rect}\marg{($x_0,y_0$),($x_1,y_1$)}}
346
347 \subsection{Circles, arcs and ellipses}
348
349 \def\firstkeyfrac{.55}
350 \def\secondkeyfrac{.45}
351
352 \describe{Circles} {}
353 \describe{\qquad polar form (default):}
354 {\cs{circle}\oarg{p}\marg{\meta{center},\meta{radius}}}
355 \describe{\qquad three-point form:}
356 {\cs{circle}\oarg{t}\marg{($x_0,y_0$),($x_1,y_1$),($x_2,y_2$)}}
357 \describe{\qquad center-point form:}
358 {\cs{circle}\oarg{c}\marg{\meta{center},\meta{point}}}
359 \describe{\qquad point-sweep form:}
360 {\cs{circle}\oarg{s}\marg{($x_0,y_0$),($x_1,y_1$),\meta{angle}}}
361 \describe{Arcs} {}
362 \describe{\qquad polar form:}
363 {\cs{arc}\oarg{p}\marg{\meta{center},\meta{$\theta_1$},\meta{$\theta_2$},%
364 \meta{radius}}}
365 \describe{\qquad three-point form:}
366 {\cs{arc}\oarg{t}\marg{($x_0,y_0$),($x_1,y_1$),($x_2,y_2$)}}
367 \describe{\qquad center-point-angle form:}
368 {\cs{arc}\oarg{c}\marg{\meta{center},\meta{point},\meta{angle}}}
369 \describe{\qquad point-sweep form (default):}
370 {\cs{arc}\oarg{s}\marg{($x_0,y_0$),($x_1,y_1$),\meta{angle}}}
371 \describe{Ellipse, center $(x_0,y_0)$, radii \meta{$r_x$}, \meta{$r_y$}, angle
372 \meta{$\theta$}}
373 {\cs{ellipse}\oarg{\meta{$\theta$}}%
374 \tt\{($x_0,y_0$),\meta{$r_x$},\meta{$r_y$}\}}
375
376 \section{General curves}
377
378 \def\firstkeyfrac{.45}
379 \def\secondkeyfrac{.55}
380
381 A \meta{spec} can be {\tt p} (for polyline) or {\tt s} (for smooth)
382 followed by a number for the tension.
383
384 \smallskip
385 \describe{Smooth curve through points}
386 {\cs{curve}\oarg{\meta{tension}}\marg{($x_0,y_0$),($x_1,y_1$),$\ldots$}}
387 \describe{Graph of $y=f(x)$}
388 {\cs{function}\oarg{\meta{spec}}\marg{$x_{\min}$,$x_{\max}$,%
389 $\Delta x$}\marg{$f(\hbox{\tt x})$}}
390 \describe{Graph of parametric curve $(x(t),y(t))$}
391 {\cs{parafcn}\oarg{\meta{spec}}\marg{$t_{\min}$,$t_{\max}$,$\Delta t$}%
392 \marg{($x(\hbox{\tt t})$, $y(\hbox{\tt t})$)}}
393 \describe{Graph of $r = f(\theta)$}
394 {\cs{plrfcn}\oarg{\meta{spec}}%
395 \marg{$\theta_{\min}$,$\theta_{\max}$,$\Delta\theta$}\marg{$f(\hbox{\tt t})$}}
396 \describe{Interpolate with a smooth {\it function}}
397 {\cs{fcncurve}\oarg{\meta{tension}}\marg{($x_0,y_0$),($x_1,y_1$),$\ldots$}}
398 \describe{Curve from data in a file}
399 {\cs{datafile}\oarg{\meta{spec}}\marg{\meta{file}}}
400 \describe{\quad Set how \cs{datafile} processes a line}
401 {\cs{using}\marg{\meta{read\_pattern}}\marg{\meta{write\_pattern}}\brk
402 Default is \cs{using}\marg{\#1 \#2 \#3}\marg{(\#1,\#2)}}
403
404
405 \section{Regions}
406
407 \def\firstkeyfrac{.45}
408 \def\secondkeyfrac{.55}
409
410 Curves are not necessarily `closed' even if the start and end are the
411 same. The following are closed (can be filled), as are \cs{rect},
412 \cs{polygon}, \cs{circle}, and \cs{ellipse}.
413
414 \smallskip
415 \describe{Closed curve through given points}
416 {\cs{cyclic}\oarg{\meta{tension}}\marg{$(x_1,y_1),(x_2,y_2),\ldots$}}
417 \describe{Circular sector (pie slice)}
418 {\cs{sector}\marg{\meta{center},\meta{radius},\meta{$\theta_1$},%
419 \meta{$\theta_2$}}}
420 \describe{Region between two functions}
421 {\cs{btwnfcn}\oarg{\meta{spec}}\marg{$x_{\min}$,%
422 $x_{\max}$,$\Delta x$}\marg{$f(\hbox{\tt x})$}\marg{$g(\hbox{\tt x})$}}
423 \describe{Region in polar coordinates}
424 {\cs{plrregion}\oarg{\meta{spec}}\marg{$\theta_{\min}$,$\theta_{\max}$,%
425 $\Delta \theta$}\marg{$f(\hbox{\tt t})$}}
426 \describe{Curves surrounding text}
427 {\cs{tlabelrect}\oarg{\meta{radius}}\parg{\meta{x},\meta{y}}\marg{\meta{text}}\brk
428 \cs{tlabeloval}\oarg{\meta{mult}}\parg{\meta{x},\meta{y}}\marg{\meta{text}}\brk
429 \cs{tlabelellipse}\oarg{\meta{ratio}}\parg{\meta{x},\meta{y}}\marg{\meta{text}}\brk
430 \meta{radius}: round corners. \meta{mult}: stretch horizontally.
431 \meta{ratio}: width/height of ellipse}
432
433
434 \section{Prefix macros}
435
436 \subsection{Drawing curves}
437
438 \def\firstkeyfrac{.4}
439 \def\secondkeyfrac{.6}
440
441 \describe{Dashed path}{\cs{dashed}\oarg{\meta{length},\meta{gap}}$\ldots$}
442 \describe{Dotted path}{\cs{dotted}\oarg{\meta{size},\meta{gap}}$\ldots$}
443 \describe{Trace a path with symbols}
444 {\cs{plot}\oarg{\meta{size},\meta{gap}}\marg{\meta{symbol}}$\ldots$}
445 \describe{Generalized dashes}{\cs{gendashed}\marg{\meta{patname}}$\ldots$}
446 \describe{\quad Define a named dash pattern}
447 {\cs{dashpattern}\marg{\meta{patname}}\marg{\meta{len$_1$},\meta{len$_2$},$\ldots$,%
448 \meta{len$_{2n}$}}}
449 \describe{Place a symbol at all nodes}
450 {\cs{plotnodes}\oarg{\meta{size}}\marg{\meta{symbol}}$\ldots$}
451 \describe{Solid curve}{\cs{draw}\oarg{\meta{color}}$\ldots$}
452
453
454 \subsection{Closing a curve}
455
456 \def\firstkeyfrac{.45}
457 \def\secondkeyfrac{.55}
458
459 These turn any path into a `closed' path (result can then be filled).
460
461 \smallskip
462 \describe{Close with a straight line,}{\cs{lclosed}$\ldots$}
463 \describe{Close with a smooth join, like \cs{cycle},}{\cs{sclosed}$\ldots$}
464 \describe{Close letting \MF{} choose}{\cs{bclosed}$\ldots$}
465
466 \subsection{Filling closed curves}
467
468 \def\firstkeyfrac{.4}
469 \def\secondkeyfrac{.6}
470
471 These filling prefixes turn off automatic drawing of the curve.
472
473 \smallskip
474 \describe{Solid fill} {\cs{gfill}\oarg{\meta{color}}$\ldots$}
475 \describe{Unfill} {\cs{gclear}$\ldots$}
476 \describe{Hatched fills}
477 {\cs{thatch}\oarg{\meta{space},\meta{angle}}\oarg{\meta{color}}$\ldots$}
478 \describe{\qquad \meta{angle}${}=45\,$deg}
479 {\cs{rhatch}\oarg{\meta{space}}\oarg{\meta{color}}$\ldots$}
480 \describe{\qquad \meta{angle}${}=-45\,$deg}
481 {\cs{lhatch}\oarg{\meta{space}}\oarg{\meta{color}}$\ldots$}
482 \describe{\qquad crosshatching}
483 {\cs{xhatch}\oarg{\meta{space}}\oarg{\meta{color}}$\ldots$}
484 \describe{} {\cs{hatch} $=$ \cs{xhatch}}
485 \describe{Shading}
486 {\cs{shade}\oarg{\meta{space}}$\ldots$}
487 \describe{Gradients$^{\dag}$}
488 {\cs{gradient}\marg{\meta{clr},\meta{width},\meta{angle}}$\ldots$}
489 \describe{}
490 {\cs{areagradient}\marg{\meta{clr},\meta{h-wd},\meta{v-wd}}$\ldots$}
491 \describe{}
492 {\cs{radialgradient}\marg{\meta{clr},\meta{wd},\meta{center}}$\ldots$}
493 \describe{Polkadot fill}{\cs{polkadot}\oarg{\meta{space}}$\ldots$}
494 \describe{Fill with copies of a tile} {\cs{tess}\marg{\meta{tile}}$\ldots$}
495 \describe{\quad Define a tile*}
496 {\cs{tile}\marg{\meta{name},\meta{unit},\meta{width},\meta{height},\meta{clip}}
497 \meta{drawing commands} \cs{endtile}}
498
499 \smallskip
500 $^{\dag}$ \meta{clr} is a function that returns a color for parameter(s)
501 in $(0,1)$.\brk
502 * Creates a mini-mfpic, clipped if \meta{clip}${}={}${\tt true}.
503
504 \subsection{Storing and reusing a path}
505
506 \describe{Store a path} {\cs{store}\marg{\meta{name}}$\ldots$}
507 \nobreak
508 \describe{\quad reusing a stored path} {\cs{mfobj}\marg{\meta{name}}}
509
510 \subsection{Subpaths}
511
512 \describe{Subpath by fractions of length}
513 {\cs{partpath}\marg{\meta{frac1},\meta{frac2}}$\ldots$}
514 \describe{Subpath by node numbers} {\cs{subpath}\marg{\meta{m},\meta{n}}$\ldots$}
515 \describe{Cutting by another path}
516 {\cs{cutoffafter}\marg{\meta{obj}}$\ldots$,
517 \cs{cutoffbefore}\marg{\meta{obj}}$\ldots$.\brk
518 \meta{obj} is a name created with \cs{store}}
519 \describe{Trim the ends of a path}
520 {\cs{trimpath}\marg{\meta{dim1},\meta{dim2}}$\ldots$}
521
522
523 \subsection{Modifying a curve}
524
525 \def\firstkeyfrac{.4}
526 \def\secondkeyfrac{.6}
527
528 \describe{Add arrowhead to the end}
529 {\cs{arrow}\oarg{l\meta{length}}\oarg{r\meta{angle}}%
530 \oarg{b\meta{backset}}\oarg{c\meta{color}}$\ldots$}
531 \describe{\quad Define arrowhead shape}
532 {\cs{headshape}\marg{\meta{ratio}}\marg{\meta{tension}}\marg{\meta{filled}}}
533 \describe{Reverse a curve} {\cs{reverse}$\ldots$}
534 \describe{Double arrow} {\cs{arrow}\cs{reverse}\cs{arrow}$\ldots$}
535 \describe{Rotate around a point} {\cs{rotatepath}\marg{($x_0$,$y_0$),\meta{angle}}$\ldots$}
536 \describe{Reflect about a line} {\cs{reflectpath}\marg{($x_0$,$y_0$),($x_1$,$y_1$)}$\ldots$}
537 \describe{Shift} {\cs{shiftpath}\marg{($dx$,$dy$)}$\ldots$}
538 \describe{Scale around a point} {\cs{scalepath}\marg{($x_0$,$y_0$),\meta{scale}}$\ldots$}
539 \describe{xscale about line $x=x_0$} {\cs{xscalepath}\marg{$x_0$,\meta{scale}}$\ldots$}
540 \describe{yscale about line $y=y_0$} {\cs{yscalepath}\marg{$y_0$,\meta{scale}}$\ldots$}
541 \describe{slant, pivoting on line $y=y_0$} {\cs{slantpath}\marg{$y_0$,\meta{slant}}$\ldots$}
542 \describe{yslant, pivoting on line $x=x_0$} {\cs{yslantpath}\marg{$x_0$,\meta{slant}}$\ldots$}
543 \describe{Swap x and y} {\cs{xyswappath}$\ldots$}
544
545
546 \section{Axes}
547
548 \def\firstkeyfrac{.30}
549 \def\secondkeyfrac{.70}
550
551 \describe{Draw x- and/or y-axes} {\cs{axes}\oarg{\meta{headlen}},
552 \cs{xaxis}\oarg{\meta{headlen}}, \cs{yaxis}\oarg{\meta{headlen}}}
553 \describe{Draw various axes}
554 {\cs{axis}\oarg{\meta{headlen}}\marg{\meta{axis}}, \ \meta{axis} is one of
555 {\tt x}, {\tt y}, {\tt l}, {\tt b}, {\tt r}, or {\tt t}.}
556 \describe{Draw many axes} {\cs{doaxes}\oarg{\meta{headlen}}\marg{\meta{list}}, \
557 \meta{list} of letters, no commas.}
558 \describe{Shift border axis inward}
559 {\cs{axismargin}\marg{\meta{axis}}\marg{\meta{amt}}, \ \meta{amt} is
560 in graph units.}
561 \describe{Add hashmarks to axes}{%
562 \cs{axismarks}\marg{\meta{axis}}\oarg{\meta{len}}\marg{$c_1$,$c_2$,$\ldots$}, \
563 $c_j$ are positions.\brk Abbrev. by
564 \cs{xmarks} for \cs{axismarks}\marg{x}, etc.}
565 \describe{Change position of hash marks}
566 {\cs{setaxismarks}\marg{\meta{axis}}\marg{\meta{pos}} \ \meta{pos} is one of
567 {\tt inside}, {\tt outside}, {\tt centered}, {\tt ontop},
568 {\tt onbottom}, {\tt onleft}, or {\tt onright}.}
569
570 \section{Miscellaneous}
571
572 \def\firstkeyfrac{.30}
573 \def\secondkeyfrac{.70}
574
575 \describe{Text labels}
576 {\cs{tlabel}\oarg{\meta{pos}\meta{$\theta$}}%
577 \parg{\meta{x},\meta{y}}\marg{\meta{\TeX{} text}}\brk
578 \cs{tlabels}\marg{\meta{args$_1$}\meta{args$_2$}$\ldots$}\brk
579 \cs{axislabels}\marg{\meta{axis}}\oarg{\meta{pos}\meta{$\theta$}}%
580 \marg{\marg{\meta{txt$_1$}}\meta{$n_1$},%
581 \marg{\meta{txt$_2$}}\meta{$n_2$},$\ldots$}\brk
582 \meta{pos} is a two-letter sequence, \meta{$\theta$} the
583 angle* of rotation in degrees;
584 \meta{args$_j$} is an entire set of arguments as in \cs{tlabel};
585 \meta{axis} is a letter, \meta{txt$_j$} is label, \meta{$n_j$}
586 is coordinate on axis}
587 \describe{Clipping to a path} {\cs{gclip}$\ldots$}
588 \describe{Polar conversion}
589 {\cs{plr}\marg{($r_0$,$\theta_0$),($r_1$,$\theta_1$),$\ldots$}}
590 \describe{Connect paths} {\cs{connect} \meta{path1} \meta{path2} $\ldots$
591 \cs{endconnect}}
592 \describe{Draw many curves from one datafile}
593 {\cs{plotdata}\oarg{\meta{spec}}\marg{\meta{file}}, \ \meta{spec} is {\tt
594 p} or {\tt s\meta{num}} where \meta{num} is the (optional) tension
595 in the smooth curve}
596 \describe{Set how \cs{plotdata} draws curves$^{\dag}$}{\cs{dashedlines}
597 \ (different dash patterns)\brk
598 \cs{coloredlines} \ (different colors, \MP{} only)\brk
599 \cs{pointedlines} \ (different symbols, like \cs{plot})\brk
600 \cs{datapointsonly} \ (different symbols, like \cs{plotnodes})}
601
602 \smallskip
603 * The angle is optional, and ignored unless option \opt{mplabels} is
604 in effect.\brk
605 $^{\dag}$ \cs{plotdata} also respects the \cs{using} setting (see
606 \cs{datafile} in section {\bf General curves}).
607
608 \bye
609
610 % Other commands:
611 \cs{setrender}[\<\TeX{} commands\>]
612
613 \cs{coords}$\ldots$\cs{endcoords}
614 \cs{applyT}[\<transformer\>]
615 \cs{rotate}[$\theta$]
616 \cs{rotatearound}[$p$][$\theta$]
617 \cs{turn}[?$p$][$\theta$]
618 \cs{mirror}[$p_1$][$p_2$]
619 \cs{reflectabout}[$p_1$][$p_2$]
620 \cs{shift}[$p$]
621 \cs{scale}[$s$]
622 \cs{xscale}[$s$]
623 \cs{yscale}[$s$]
624 \cs{zscale}[$p$]
625 \cs{xslant}[$s$]
626 \cs{yslant}[$s$]
627 \cs{zslant}[$s$]
628 \cs{boost}[$\chi$]
629 \cs{xyswap}
630
631 \cs{fdef}[\<fcn\>]%
632 (\<param1\>,\<param2\>,$\ldots$)%
633 [\<mf-expr\>]
634
635 \cs{tcaption}[?\<maxwd\>,\<linewd\>][\<caption text\>]
636
637 \cs{savepic}\bsl\<picname\>
638 \cs{newsavepic}
639 \cs{usepic}
640
641 \cs{dashlineset}, \cs{dotlineset}
642
643 \cs{mfsrc}[\<metafont code\>]
644 \cs{noship}
645
646 \cs{store}[\<path variable\>][\<path\>]
647 \cs{mfobj}[\<path expression\>]
648 \cs{patharr}[\<pv\>]$\ldots$\cs{endpatharr}
649
650 \cs{mftitle}[\<title\>]
651 \cs{tmtitle}[\<title\>]
652
653 \cs{newfdim}[\<fdim\>]
654
655 \cs{setmfpicgraphic}
656 \cs{getmfpicoffset}
657 \cs{setfilename}
658
659 \bye