home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: chapter2.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 20 7b 53 69 6d 70 6c 65 |\chapter| {Simple|
|00000010| 20 55 73 65 20 6f 66 20 | 50 4c 50 4c 4f 54 7d 20 | Use of |PLPLOT} |
|00000020| 5c 6c 61 62 65 6c 7b 73 | 69 6d 70 6c 65 7d 0a 0a |\label{s|imple}..|
|00000030| 5c 73 65 63 74 69 6f 6e | 20 7b 50 6c 6f 74 74 69 |\section| {Plotti|
|00000040| 6e 67 20 61 20 53 69 6d | 70 6c 65 20 47 72 61 70 |ng a Sim|ple Grap|
|00000050| 68 7d 0a 57 65 20 73 68 | 61 6c 6c 20 66 69 72 73 |h}.We sh|all firs|
|00000060| 74 20 63 6f 6e 73 69 64 | 65 72 20 70 6c 6f 74 74 |t consid|er plott|
|00000070| 69 6e 67 20 73 69 6d 70 | 6c 65 20 67 72 61 70 68 |ing simp|le graph|
|00000080| 73 20 73 68 6f 77 69 6e | 67 20 74 68 65 20 64 65 |s showin|g the de|
|00000090| 70 65 6e 64 65 6e 63 65 | 20 0a 6f 66 20 6f 6e 65 |pendence| .of one|
|000000a0| 20 76 61 72 69 61 62 6c | 65 20 75 70 6f 6e 20 61 | variabl|e upon a|
|000000b0| 6e 6f 74 68 65 72 2e 20 | 53 75 63 68 20 61 20 67 |nother. |Such a g|
|000000c0| 72 61 70 68 20 6d 61 79 | 20 62 65 20 63 6f 6d 70 |raph may| be comp|
|000000d0| 6f 73 65 64 20 6f 66 20 | 73 65 76 65 72 61 6c 20 |osed of |several |
|000000e0| 0a 65 6c 65 6d 65 6e 74 | 73 3a 0a 5c 62 65 67 69 |.element|s:.\begi|
|000000f0| 6e 7b 69 74 65 6d 69 7a | 65 7d 0a 20 20 20 5c 69 |n{itemiz|e}. \i|
|00000100| 74 65 6d 20 41 20 62 6f | 78 20 77 68 69 63 68 20 |tem A bo|x which |
|00000110| 64 65 66 69 6e 65 73 20 | 74 68 65 20 72 61 6e 67 |defines |the rang|
|00000120| 65 73 20 6f 66 20 74 68 | 65 20 76 61 72 69 61 62 |es of th|e variab|
|00000130| 6c 65 73 2c 20 70 65 72 | 68 61 70 73 20 77 69 74 |les, per|haps wit|
|00000140| 68 20 61 78 65 73 0a 20 | 20 20 20 20 20 20 20 20 |h axes. | |
|00000150| 61 6e 64 20 6e 75 6d 65 | 72 69 63 20 6c 61 62 65 |and nume|ric labe|
|00000160| 6c 73 20 61 6c 6f 6e 67 | 20 69 74 73 20 65 64 67 |ls along| its edg|
|00000170| 65 73 2c 0a 20 20 20 5c | 69 74 65 6d 20 41 20 73 |es,. \|item A s|
|00000180| 65 74 20 6f 66 20 70 6f | 69 6e 74 73 20 6f 72 20 |et of po|ints or |
|00000190| 6c 69 6e 65 73 20 77 69 | 74 68 69 6e 20 74 68 65 |lines wi|thin the|
|000001a0| 20 62 6f 78 20 73 68 6f | 77 69 6e 67 20 74 68 65 | box sho|wing the|
|000001b0| 20 66 75 6e 63 74 69 6f | 6e 61 6c 20 0a 20 20 20 | functio|nal . |
|000001c0| 20 20 20 20 20 20 64 65 | 70 65 6e 64 65 6e 63 65 | de|pendence|
|000001d0| 2c 0a 20 20 20 5c 69 74 | 65 6d 20 41 20 73 65 74 |,. \it|em A set|
|000001e0| 20 6f 66 20 6c 61 62 65 | 6c 73 20 66 6f 72 20 74 | of labe|ls for t|
|000001f0| 68 65 20 76 61 72 69 61 | 62 6c 65 73 20 61 6e 64 |he varia|bles and|
|00000200| 20 61 20 74 69 74 6c 65 | 20 66 6f 72 20 74 68 65 | a title| for the|
|00000210| 20 67 72 61 70 68 2e 0a | 5c 65 6e 64 7b 69 74 65 | graph..|\end{ite|
|00000220| 6d 69 7a 65 7d 20 20 20 | 0a 49 6e 20 6f 72 64 65 |mize} |.In orde|
|00000230| 72 20 74 6f 20 64 72 61 | 77 20 73 75 63 68 20 61 |r to dra|w such a|
|00000240| 20 67 72 61 70 68 2c 20 | 69 74 20 69 73 20 6e 65 | graph, |it is ne|
|00000250| 63 65 73 73 61 72 79 20 | 74 6f 20 63 61 6c 6c 20 |cessary |to call |
|00000260| 61 74 20 6c 65 61 73 74 | 20 66 6f 75 72 20 6f 66 |at least| four of|
|00000270| 20 0a 74 68 65 20 50 4c | 50 4c 4f 54 20 66 75 6e | .the PL|PLOT fun|
|00000280| 63 74 69 6f 6e 73 3a 0a | 5c 62 65 67 69 6e 7b 65 |ctions:.|\begin{e|
|00000290| 6e 75 6d 65 72 61 74 65 | 7d 0a 20 20 20 5c 69 74 |numerate|}. \it|
|000002a0| 65 6d 20 7b 5c 74 74 20 | 70 6c 73 74 61 72 7d 2c |em {\tt |plstar},|
|000002b0| 20 74 6f 20 73 70 65 63 | 69 66 79 20 74 68 65 20 | to spec|ify the |
|000002c0| 64 65 76 69 63 65 20 79 | 6f 75 20 77 61 6e 74 20 |device y|ou want |
|000002d0| 74 6f 20 70 6c 6f 74 20 | 6f 6e 2c 0a 20 20 20 5c |to plot |on,. \|
|000002e0| 69 74 65 6d 20 7b 5c 74 | 74 20 70 6c 65 6e 76 7d |item {\t|t plenv}|
|000002f0| 2c 20 74 6f 20 64 65 66 | 69 6e 65 20 74 68 65 20 |, to def|ine the |
|00000300| 72 61 6e 67 65 20 61 6e | 64 20 73 63 61 6c 65 20 |range an|d scale |
|00000310| 6f 66 20 74 68 65 20 67 | 72 61 70 68 2c 20 61 6e |of the g|raph, an|
|00000320| 64 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d. | |
|00000330| 20 20 20 20 20 20 20 20 | 64 72 61 77 20 6c 61 62 | |draw lab|
|00000340| 65 6c 73 2c 20 61 78 65 | 73 2c 20 65 74 63 2e 2c |els, axe|s, etc.,|
|00000350| 0a 20 20 20 5c 69 74 65 | 6d 20 4f 6e 65 20 6f 72 |. \ite|m One or|
|00000360| 20 6d 6f 72 65 20 63 61 | 6c 6c 73 20 74 6f 20 7b | more ca|lls to {|
|00000370| 5c 74 74 20 70 6c 6c 69 | 6e 65 7d 20 6f 72 20 7b |\tt plli|ne} or {|
|00000380| 5c 74 74 20 70 6c 70 6f | 69 6e 7d 20 74 6f 20 64 |\tt plpo|in} to d|
|00000390| 72 61 77 0a 20 20 20 20 | 20 20 20 20 20 6c 69 6e |raw. | lin|
|000003a0| 65 73 20 6f 72 20 70 6f | 69 6e 74 73 20 61 73 20 |es or po|ints as |
|000003b0| 6e 65 65 64 65 64 2e 20 | 4f 74 68 65 72 20 6d 6f |needed. |Other mo|
|000003c0| 72 65 20 63 6f 6d 70 6c | 65 78 20 72 6f 75 74 69 |re compl|ex routi|
|000003d0| 6e 65 73 20 69 6e 63 6c | 75 64 65 0a 20 20 20 20 |nes incl|ude. |
|000003e0| 20 20 20 20 20 7b 5c 74 | 74 20 70 6c 62 69 6e 7d | {\t|t plbin}|
|000003f0| 20 61 6e 64 20 7b 5c 74 | 74 20 70 6c 68 69 73 74 | and {\t|t plhist|
|00000400| 7d 20 74 6f 20 64 72 61 | 77 20 68 69 73 74 6f 67 |} to dra|w histog|
|00000410| 72 61 6d 73 2c 20 7b 5c | 74 74 20 70 6c 65 72 72 |rams, {\|tt plerr|
|00000420| 78 7d 20 61 6e 64 20 0a | 20 20 20 20 20 20 20 20 |x} and .| |
|00000430| 20 7b 5c 74 74 20 70 6c | 65 72 72 79 7d 20 74 6f | {\tt pl|erry} to|
|00000440| 20 64 72 61 77 20 65 72 | 72 6f 72 2d 62 61 72 73 | draw er|ror-bars|
|00000450| 2c 20 5c 6c 61 62 65 6c | 7b 64 72 61 77 7d 0a 20 |, \label|{draw}. |
|00000460| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 70 6c 65 | \item |{\tt ple|
|00000470| 6e 64 7d 2c 20 74 6f 20 | 63 6c 6f 73 65 20 74 68 |nd}, to |close th|
|00000480| 65 20 70 6c 6f 74 2e 0a | 5c 65 6e 64 7b 65 6e 75 |e plot..|\end{enu|
|00000490| 6d 65 72 61 74 65 7d 0a | 4d 6f 72 65 20 74 68 61 |merate}.|More tha|
|000004a0| 6e 20 6f 6e 65 20 67 72 | 61 70 68 20 63 61 6e 20 |n one gr|aph can |
|000004b0| 62 65 20 64 72 61 77 6e | 20 6f 6e 20 61 20 73 69 |be drawn| on a si|
|000004c0| 6e 67 6c 65 20 73 65 74 | 20 6f 66 20 61 78 65 73 |ngle set| of axes|
|000004d0| 20 62 79 20 6d 61 6b 69 | 6e 67 0a 72 65 70 65 61 | by maki|ng.repea|
|000004e0| 74 65 64 20 63 61 6c 6c | 73 20 74 6f 20 74 68 65 |ted call|s to the|
|000004f0| 20 72 6f 75 74 69 6e 65 | 73 20 6c 69 73 74 65 64 | routine|s listed|
|00000500| 20 69 6e 20 69 74 65 6d | 20 5c 72 65 66 7b 64 72 | in item| \ref{dr|
|00000510| 61 77 7d 20 61 62 6f 76 | 65 2e 20 54 68 65 20 72 |aw} abov|e. The r|
|00000520| 6f 75 74 69 6e 65 0a 7b | 5c 74 74 20 70 6c 73 74 |outine.{|\tt plst|
|00000530| 61 72 7d 20 6e 65 65 64 | 73 20 74 6f 20 62 65 20 |ar} need|s to be |
|00000540| 63 61 6c 6c 65 64 20 6f | 6e 6c 79 20 6f 6e 63 65 |called o|nly once|
|00000550| 2c 20 75 6e 6c 65 73 73 | 20 61 20 64 69 66 66 65 |, unless| a diffe|
|00000560| 72 65 6e 74 20 6f 75 74 | 70 75 74 20 64 65 76 69 |rent out|put devi|
|00000570| 63 65 0a 69 73 20 72 65 | 71 75 69 72 65 64 2e 0a |ce.is re|quired..|
|00000580| 0a 5c 73 65 63 74 69 6f | 6e 20 7b 53 74 61 72 74 |.\sectio|n {Start|
|00000590| 69 6e 67 20 50 4c 50 4c | 4f 54 7d 20 5c 6c 61 62 |ing PLPL|OT} \lab|
|000005a0| 65 6c 7b 73 74 61 72 74 | 69 6e 67 75 70 7d 0a 53 |el{start|ingup}.S|
|000005b0| 75 62 72 6f 75 74 69 6e | 65 20 7b 5c 74 74 20 70 |ubroutin|e {\tt p|
|000005c0| 6c 73 74 61 72 7d 20 73 | 65 6c 65 63 74 73 20 61 |lstar} s|elects a|
|000005d0| 20 67 72 61 70 68 69 63 | 73 20 64 65 76 69 63 65 | graphic|s device|
|000005e0| 20 6f 72 20 6f 70 65 6e | 73 20 61 20 64 69 73 6b | or open|s a disk|
|000005f0| 20 66 69 6c 65 20 74 6f | 0a 72 65 63 65 69 76 65 | file to|.receive|
|00000600| 20 61 20 70 6c 6f 74 20 | 66 6f 72 20 6c 61 74 65 | a plot |for late|
|00000610| 72 20 64 69 73 70 6c 61 | 79 2e 20 49 66 20 7b 5c |r displa|y. If {\|
|00000620| 74 74 20 70 6c 73 74 61 | 72 7d 20 69 73 20 63 61 |tt plsta|r} is ca|
|00000630| 6c 6c 65 64 20 61 67 61 | 69 6e 20 64 75 72 69 6e |lled aga|in durin|
|00000640| 67 0a 61 20 70 72 6f 67 | 72 61 6d 2c 20 74 68 65 |g.a prog|ram, the|
|00000650| 20 70 72 65 76 69 6f 75 | 73 6c 79 20 6f 70 65 6e | previou|sly open|
|00000660| 65 64 20 66 69 6c 65 20 | 77 69 6c 6c 20 62 65 20 |ed file |will be |
|00000670| 63 6c 6f 73 65 64 2e 20 | 57 68 65 6e 20 63 61 6c |closed. |When cal|
|00000680| 6c 65 64 2c 0a 74 68 65 | 20 75 73 65 72 20 69 73 |led,.the| user is|
|00000690| 20 70 72 6f 6d 70 74 65 | 64 20 66 6f 72 20 61 20 | prompte|d for a |
|000006a0| 6e 75 6d 62 65 72 20 72 | 65 70 72 65 73 65 6e 74 |number r|epresent|
|000006b0| 69 6e 67 20 74 68 65 20 | 64 65 76 69 63 65 20 6f |ing the |device o|
|000006c0| 6e 20 77 68 69 63 68 20 | 0a 74 68 65 20 70 6c 6f |n which |.the plo|
|000006d0| 74 20 69 73 20 74 6f 20 | 61 70 70 65 61 72 2e 20 |t is to |appear. |
|000006e0| 54 68 65 20 73 79 6e 74 | 61 78 20 66 6f 72 20 7b |The synt|ax for {|
|000006f0| 5c 74 74 20 70 6c 73 74 | 61 72 7d 20 69 73 3a 0a |\tt plst|ar} is:.|
|00000700| 0a 5c 6e 61 6d 65 7b 70 | 6c 73 74 61 72 28 6e 78 |.\name{p|lstar(nx|
|00000710| 2c 6e 79 29 3b 7d 0a 5c | 61 72 67 75 7b 7b 5c 74 |,ny);}.\|argu{{\t|
|00000720| 74 20 6e 78 2c 20 6e 79 | 7d 20 28 69 6e 74 2c 20 |t nx, ny|} (int, |
|00000730| 69 6e 70 75 74 29 7d 0a | 7b 54 68 65 20 6e 75 6d |input)}.|{The num|
|00000740| 62 65 72 20 6f 66 20 70 | 6c 6f 74 73 20 74 6f 20 |ber of p|lots to |
|00000750| 61 20 70 61 67 65 2e 20 | 54 68 65 20 70 61 67 65 |a page. |The page|
|00000760| 20 69 73 20 64 69 76 69 | 64 65 64 20 69 6e 74 6f | is divi|ded into|
|00000770| 20 0a 7b 5c 74 74 20 6e | 78 7d 7e 24 5c 74 69 6d | .{\tt n|x}~$\tim|
|00000780| 65 73 24 7e 7b 5c 74 74 | 20 6e 79 7d 20 73 75 62 |es$~{\tt| ny} sub|
|00000790| 70 61 67 65 73 2c 20 77 | 69 74 68 20 7b 5c 74 74 |pages, w|ith {\tt|
|000007a0| 20 6e 78 7d 20 69 6e 20 | 74 68 65 20 68 6f 72 69 | nx} in |the hori|
|000007b0| 7a 6f 6e 74 61 6c 20 0a | 64 69 72 65 63 74 69 6f |zontal .|directio|
|000007c0| 6e 2c 20 61 6e 64 20 7b | 5c 74 74 20 6e 79 7d 20 |n, and {|\tt ny} |
|000007d0| 69 6e 20 74 68 65 20 76 | 65 72 74 69 63 61 6c 20 |in the v|ertical |
|000007e0| 64 69 72 65 63 74 69 6f | 6e 2e 7d 0a 0a 53 75 62 |directio|n.}..Sub|
|000007f0| 70 61 67 65 73 20 61 72 | 65 20 75 73 65 66 75 6c |pages ar|e useful|
|00000800| 20 66 6f 72 20 70 6c 61 | 63 69 6e 67 20 73 65 76 | for pla|cing sev|
|00000810| 65 72 61 6c 20 67 72 61 | 70 68 73 20 6f 6e 20 61 |eral gra|phs on a|
|00000820| 20 70 61 67 65 2c 20 62 | 75 74 20 61 6c 6c 0a 73 | page, b|ut all.s|
|00000830| 75 62 70 61 67 65 73 20 | 61 72 65 20 63 6f 6e 73 |ubpages |are cons|
|00000840| 74 72 61 69 6e 65 64 20 | 74 6f 20 62 65 20 6f 66 |trained |to be of|
|00000850| 20 74 68 65 20 73 61 6d | 65 20 73 69 7a 65 2e 20 | the sam|e size. |
|00000860| 46 6f 72 20 67 72 65 61 | 74 65 72 20 66 6c 65 78 |For grea|ter flex|
|00000870| 69 62 69 6c 69 74 79 20 | 0a 69 6e 20 70 6c 61 63 |ibility |.in plac|
|00000880| 69 6e 67 20 67 72 61 70 | 68 73 20 6f 6e 20 61 20 |ing grap|hs on a |
|00000890| 70 61 67 65 2c 20 72 65 | 61 64 20 70 61 67 65 20 |page, re|ad page |
|000008a0| 5c 70 61 67 65 72 65 66 | 7b 76 69 65 77 70 6f 72 |\pageref|{viewpor|
|000008b0| 74 7d 20 69 6e 20 53 65 | 63 74 69 6f 6e 20 0a 5c |t} in Se|ction .\|
|000008c0| 72 65 66 7b 76 69 65 77 | 70 6f 72 74 7d 20 77 68 |ref{view|port} wh|
|000008d0| 69 63 68 20 64 69 73 63 | 75 73 73 65 73 20 76 69 |ich disc|usses vi|
|000008e0| 65 77 70 6f 72 74 73 2e | 0a 0a 5c 73 65 63 74 69 |ewports.|..\secti|
|000008f0| 6f 6e 7b 44 65 66 69 6e | 69 6e 67 20 70 6c 6f 74 |on{Defin|ing plot|
|00000900| 20 73 63 61 6c 65 73 20 | 61 6e 64 20 61 78 65 73 | scales |and axes|
|00000910| 7d 0a 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 7b |}.The fu|nction {|
|00000920| 5c 74 74 20 70 6c 65 6e | 76 7d 20 69 73 20 75 73 |\tt plen|v} is us|
|00000930| 65 64 20 74 6f 20 64 65 | 66 69 6e 65 20 74 68 65 |ed to de|fine the|
|00000940| 20 73 63 61 6c 65 73 20 | 61 6e 64 20 61 78 65 73 | scales |and axes|
|00000950| 20 66 6f 72 20 73 69 6d | 70 6c 65 0a 67 72 61 70 | for sim|ple.grap|
|00000960| 68 73 2e 20 7b 5c 74 74 | 20 70 6c 65 6e 76 7d 20 |hs. {\tt| plenv} |
|00000970| 73 74 61 72 74 73 20 61 | 20 6e 65 77 20 70 69 63 |starts a| new pic|
|00000980| 74 75 72 65 20 6f 6e 20 | 74 68 65 20 6e 65 78 74 |ture on |the next|
|00000990| 20 73 75 62 70 61 67 65 | 20 28 6f 72 20 61 20 6e | subpage| (or a n|
|000009a0| 65 77 20 70 61 67 65 0a | 69 66 20 6e 65 63 65 73 |ew page.|if neces|
|000009b0| 73 61 72 79 29 2c 20 61 | 6e 64 20 64 65 66 69 6e |sary), a|nd defin|
|000009c0| 65 73 20 74 68 65 20 72 | 61 6e 67 65 73 20 6f 66 |es the r|anges of|
|000009d0| 20 74 68 65 20 76 61 72 | 69 61 62 6c 65 73 20 72 | the var|iables r|
|000009e0| 65 71 75 69 72 65 64 2e | 20 54 68 65 0a 72 6f 75 |equired.| The.rou|
|000009f0| 74 69 6e 65 20 77 69 6c | 6c 20 61 6c 73 6f 20 64 |tine wil|l also d|
|00000a00| 72 61 77 20 61 20 62 6f | 78 2c 20 61 78 65 73 2c |raw a bo|x, axes,|
|00000a10| 20 61 6e 64 20 6e 75 6d | 65 72 69 63 20 6c 61 62 | and num|eric lab|
|00000a20| 65 6c 73 20 69 66 20 72 | 65 71 75 65 73 74 65 64 |els if r|equested|
|00000a30| 2e 0a 54 68 65 20 73 79 | 6e 74 61 78 20 66 6f 72 |..The sy|ntax for|
|00000a40| 20 7b 5c 74 74 20 70 6c | 65 6e 76 7d 20 69 73 3a | {\tt pl|env} is:|
|00000a50| 0a 0a 5c 6e 61 6d 65 7b | 70 6c 65 6e 76 28 78 6d |..\name{|plenv(xm|
|00000a60| 69 6e 2c 78 6d 61 78 2c | 79 6d 69 6e 2c 79 6d 61 |in,xmax,|ymin,yma|
|00000a70| 78 2c 6a 75 73 74 2c 61 | 78 69 73 29 3b 7d 0a 5c |x,just,a|xis);}.\|
|00000a80| 61 72 67 75 7b 7b 5c 74 | 74 20 78 6d 69 6e 2c 20 |argu{{\t|t xmin, |
|00000a90| 78 6d 61 78 7d 20 28 66 | 6c 6f 61 74 2c 20 69 6e |xmax} (f|loat, in|
|00000aa0| 70 75 74 29 7d 0a 7b 54 | 68 65 20 6c 65 66 74 20 |put)}.{T|he left |
|00000ab0| 61 6e 64 20 72 69 67 68 | 74 20 6c 69 6d 69 74 73 |and righ|t limits|
|00000ac0| 20 66 6f 72 20 74 68 65 | 20 68 6f 72 69 7a 6f 6e | for the| horizon|
|00000ad0| 74 61 6c 20 61 78 69 73 | 2e 7d 0a 5c 61 72 67 75 |tal axis|.}.\argu|
|00000ae0| 7b 7b 5c 74 74 20 79 6d | 69 6e 2c 20 79 6d 61 78 |{{\tt ym|in, ymax|
|00000af0| 7d 20 28 66 6c 6f 61 74 | 2c 20 69 6e 70 75 74 29 |} (float|, input)|
|00000b00| 7d 0a 7b 54 68 65 20 62 | 6f 74 74 6f 6d 20 61 6e |}.{The b|ottom an|
|00000b10| 64 20 74 6f 70 20 6c 69 | 6d 69 74 73 20 66 6f 72 |d top li|mits for|
|00000b20| 20 74 68 65 20 76 65 72 | 74 69 63 61 6c 20 61 78 | the ver|tical ax|
|00000b30| 69 73 2e 7d 0a 5c 61 72 | 67 75 7b 7b 5c 74 74 20 |is.}.\ar|gu{{\tt |
|00000b40| 6a 75 73 74 7d 20 28 69 | 6e 74 2c 20 69 6e 70 75 |just} (i|nt, inpu|
|00000b50| 74 29 7d 0a 7b 54 68 69 | 73 20 73 68 6f 75 6c 64 |t)}.{Thi|s should|
|00000b60| 20 62 65 20 7a 65 72 6f | 20 6f 72 20 6f 6e 65 2e | be zero| or one.|
|00000b70| 20 49 66 20 7b 5c 74 74 | 20 6a 75 73 74 7d 20 69 | If {\tt| just} i|
|00000b80| 73 20 6f 6e 65 2c 20 74 | 68 65 20 73 63 61 6c 65 |s one, t|he scale|
|00000b90| 73 20 6f 66 20 74 68 65 | 20 0a 78 2d 61 78 69 73 |s of the| .x-axis|
|00000ba0| 20 61 6e 64 20 0a 79 2d | 61 78 69 73 20 77 69 6c | and .y-|axis wil|
|00000bb0| 6c 20 62 65 20 74 68 65 | 20 73 61 6d 65 20 28 69 |l be the| same (i|
|00000bc0| 6e 20 75 6e 69 74 73 20 | 70 65 72 20 6d 69 6c 6c |n units |per mill|
|00000bd0| 69 6d 65 74 65 72 29 3b | 20 6f 74 68 65 72 77 69 |imeter);| otherwi|
|00000be0| 73 65 20 74 68 65 20 61 | 78 65 73 20 61 72 65 20 |se the a|xes are |
|00000bf0| 0a 73 63 61 6c 65 64 20 | 69 6e 64 65 70 65 6e 64 |.scaled |independ|
|00000c00| 65 6e 74 6c 79 2e 20 54 | 68 69 73 20 70 61 72 61 |ently. T|his para|
|00000c10| 6d 65 74 65 72 20 69 73 | 20 75 73 65 66 75 6c 20 |meter is| useful |
|00000c20| 66 6f 72 20 65 6e 73 75 | 72 69 6e 67 20 74 68 61 |for ensu|ring tha|
|00000c30| 74 20 6f 62 6a 65 63 74 | 73 0a 73 75 63 68 20 61 |t object|s.such a|
|00000c40| 73 20 63 69 72 63 6c 65 | 73 20 68 61 76 65 20 74 |s circle|s have t|
|00000c50| 68 65 20 63 6f 72 72 65 | 63 74 20 61 73 70 65 63 |he corre|ct aspec|
|00000c60| 74 20 72 61 74 69 6f 20 | 69 6e 20 74 68 65 20 66 |t ratio |in the f|
|00000c70| 69 6e 61 6c 20 70 6c 6f | 74 2e 7d 0a 5c 61 72 67 |inal plo|t.}.\arg|
|00000c80| 75 7b 7b 5c 74 74 20 61 | 78 69 73 7d 20 28 69 6e |u{{\tt a|xis} (in|
|00000c90| 74 2c 20 69 6e 70 75 74 | 29 7d 0a 7b 7b 5c 74 74 |t, input|)}.{{\tt|
|00000ca0| 20 61 78 69 73 7d 20 63 | 6f 6e 74 72 6f 6c 73 20 | axis} c|ontrols |
|00000cb0| 77 68 65 74 68 65 72 20 | 61 20 62 6f 78 2c 20 74 |whether |a box, t|
|00000cc0| 69 63 6b 20 6d 61 72 6b | 73 2c 20 6c 61 62 65 6c |ick mark|s, label|
|00000cd0| 73 2c 20 61 78 65 73 2c | 20 61 6e 64 2f 6f 72 20 |s, axes,| and/or |
|00000ce0| 61 20 0a 67 72 69 64 20 | 61 72 65 20 64 72 61 77 |a .grid |are draw|
|00000cf0| 6e 2e 0a 5c 62 65 67 69 | 6e 7b 69 74 65 6d 69 7a |n..\begi|n{itemiz|
|00000d00| 65 7d 0a 20 20 20 20 20 | 5c 69 74 65 6d 20 7b 5c |e}. |\item {\|
|00000d10| 74 74 20 61 78 69 73 3d | 2d 32 7d 3a 20 4e 6f 20 |tt axis=|-2}: No |
|00000d20| 62 6f 78 20 6f 72 20 61 | 6e 6e 6f 74 61 74 69 6f |box or a|nnotatio|
|00000d30| 6e 2e 0a 20 20 20 20 20 | 5c 69 74 65 6d 20 7b 5c |n.. |\item {\|
|00000d40| 74 74 20 61 78 69 73 3d | 2d 31 7d 3a 20 44 72 61 |tt axis=|-1}: Dra|
|00000d50| 77 20 62 6f 78 20 6f 6e | 6c 79 2e 0a 20 20 20 20 |w box on|ly.. |
|00000d60| 20 5c 69 74 65 6d 20 7b | 5c 74 74 20 61 78 69 73 | \item {|\tt axis|
|00000d70| 3d 20 30 7d 3a 20 44 72 | 61 77 20 62 6f 78 2c 20 |= 0}: Dr|aw box, |
|00000d80| 6c 61 62 65 6c 6c 65 64 | 20 77 69 74 68 20 63 6f |labelled| with co|
|00000d90| 6f 72 64 69 6e 61 74 65 | 20 76 61 6c 75 65 73 20 |ordinate| values |
|00000da0| 61 72 6f 75 6e 64 20 65 | 64 67 65 2e 0a 20 20 20 |around e|dge.. |
|00000db0| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 61 78 69 | \item |{\tt axi|
|00000dc0| 73 3d 20 31 7d 3a 20 49 | 6e 20 61 64 64 69 74 69 |s= 1}: I|n additi|
|00000dd0| 6f 6e 20 74 6f 20 62 6f | 78 20 61 6e 64 20 6c 61 |on to bo|x and la|
|00000de0| 62 65 6c 73 2c 20 64 72 | 61 77 20 74 68 65 20 74 |bels, dr|aw the t|
|00000df0| 77 6f 20 61 78 65 73 20 | 0a 20 20 20 20 20 20 20 |wo axes |. |
|00000e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e10| 20 20 20 58 3d 30 20 61 | 6e 64 20 59 3d 30 2e 0a | X=0 a|nd Y=0..|
|00000e20| 20 20 20 20 20 5c 69 74 | 65 6d 20 7b 5c 74 74 20 | \it|em {\tt |
|00000e30| 61 78 69 73 3d 20 32 7d | 3a 20 41 73 20 66 6f 72 |axis= 2}|: As for|
|00000e40| 20 7b 5c 74 74 20 61 78 | 69 73 3d 31 7d 2c 20 62 | {\tt ax|is=1}, b|
|00000e50| 75 74 20 61 6c 73 6f 20 | 64 72 61 77 20 61 20 67 |ut also |draw a g|
|00000e60| 72 69 64 20 61 74 20 74 | 68 65 20 6d 61 6a 6f 72 |rid at t|he major|
|00000e70| 20 74 69 63 6b 20 69 6e | 74 65 72 76 61 6c 2e 0a | tick in|terval..|
|00000e80| 20 20 20 20 20 5c 69 74 | 65 6d 20 7b 5c 74 74 20 | \it|em {\tt |
|00000e90| 61 78 69 73 3d 31 30 7d | 3a 20 4c 6f 67 61 72 69 |axis=10}|: Logari|
|00000ea0| 74 68 6d 69 63 20 58 20 | 61 78 69 73 2c 20 6c 69 |thmic X |axis, li|
|00000eb0| 6e 65 61 72 20 59 20 61 | 78 69 73 2e 0a 20 20 20 |near Y a|xis.. |
|00000ec0| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 61 78 69 | \item |{\tt axi|
|00000ed0| 73 3d 31 31 7d 3a 20 4c | 6f 67 61 72 69 74 68 6d |s=11}: L|ogarithm|
|00000ee0| 69 63 20 58 20 61 78 69 | 73 2c 20 6c 69 6e 65 61 |ic X axi|s, linea|
|00000ef0| 72 20 59 20 61 78 69 73 | 20 61 6e 64 20 64 72 61 |r Y axis| and dra|
|00000f00| 77 20 6c 69 6e 65 20 59 | 3d 30 2e 0a 20 20 20 20 |w line Y|=0.. |
|00000f10| 20 5c 69 74 65 6d 20 7b | 5c 74 74 20 61 78 69 73 | \item {|\tt axis|
|00000f20| 3d 32 30 7d 3a 20 4c 69 | 6e 65 61 72 20 58 20 61 |=20}: Li|near X a|
|00000f30| 78 69 73 2c 20 6c 6f 67 | 61 72 69 74 68 6d 69 63 |xis, log|arithmic|
|00000f40| 20 59 20 61 78 69 73 2e | 0a 20 20 20 20 20 5c 69 | Y axis.|. \i|
|00000f50| 74 65 6d 20 7b 5c 74 74 | 20 61 78 69 73 3d 32 31 |tem {\tt| axis=21|
|00000f60| 7d 3a 20 4c 69 6e 65 61 | 72 20 58 20 61 78 69 73 |}: Linea|r X axis|
|00000f70| 2c 20 6c 6f 67 61 72 69 | 74 68 6d 69 63 20 59 20 |, logari|thmic Y |
|00000f80| 61 78 69 73 20 61 6e 64 | 20 64 72 61 77 20 6c 69 |axis and| draw li|
|00000f90| 6e 65 20 58 3d 30 2e 0a | 20 20 20 20 20 5c 69 74 |ne X=0..| \it|
|00000fa0| 65 6d 20 7b 5c 74 74 20 | 61 78 69 73 3d 33 30 7d |em {\tt |axis=30}|
|00000fb0| 3a 20 4c 6f 67 61 72 69 | 74 68 6d 69 63 20 58 20 |: Logari|thmic X |
|00000fc0| 61 6e 64 20 59 20 61 78 | 65 73 2e 0a 5c 65 6e 64 |and Y ax|es..\end|
|00000fd0| 7b 69 74 65 6d 69 7a 65 | 7d 20 0a 7d 0a 0a 4e 6f |{itemize|} .}..No|
|00000fe0| 74 65 3a 20 4c 6f 67 61 | 72 69 74 68 6d 69 63 20 |te: Loga|rithmic |
|00000ff0| 61 78 65 73 20 6f 6e 6c | 79 20 61 66 66 65 63 74 |axes onl|y affect|
|00001000| 20 74 68 65 20 61 70 70 | 65 61 72 61 6e 63 65 20 | the app|earance |
|00001010| 6f 66 20 74 68 65 20 61 | 78 65 73 20 61 6e 64 20 |of the a|xes and |
|00001020| 74 68 65 69 72 20 0a 6c | 61 62 65 6c 73 2c 20 73 |their .l|abels, s|
|00001030| 6f 20 69 74 20 69 73 20 | 75 70 20 74 6f 20 74 68 |o it is |up to th|
|00001040| 65 20 75 73 65 72 20 74 | 6f 20 63 6f 6d 70 75 74 |e user t|o comput|
|00001050| 65 20 74 68 65 20 6c 6f | 67 61 72 69 74 68 6d 73 |e the lo|garithms|
|00001060| 20 70 72 69 6f 72 20 74 | 6f 20 70 61 73 73 69 6e | prior t|o passin|
|00001070| 67 20 0a 74 68 65 6d 20 | 74 6f 20 7b 5c 74 74 20 |g .them |to {\tt |
|00001080| 70 6c 65 6e 76 7d 20 61 | 6e 64 20 61 6e 79 20 6f |plenv} a|nd any o|
|00001090| 66 20 74 68 65 20 6f 74 | 68 65 72 20 72 6f 75 74 |f the ot|her rout|
|000010a0| 69 6e 65 73 2e 20 54 68 | 75 73 2c 20 69 66 20 61 |ines. Th|us, if a|
|000010b0| 20 67 72 61 70 68 20 68 | 61 73 20 61 20 33 2d 63 | graph h|as a 3-c|
|000010c0| 79 63 6c 65 0a 6c 6f 67 | 61 72 69 74 68 6d 69 63 |ycle.log|arithmic|
|000010d0| 20 61 78 69 73 20 66 72 | 6f 6d 20 31 20 74 6f 20 | axis fr|om 1 to |
|000010e0| 31 30 30 30 2c 20 77 65 | 20 6e 65 65 64 20 74 6f |1000, we| need to|
|000010f0| 20 73 65 74 20 7b 5c 74 | 74 20 78 6d 69 6e 7d 24 | set {\t|t xmin}$|
|00001100| 3d 5c 6c 6f 67 5f 7b 31 | 30 7d 31 3d 30 2e 30 24 |=\log_{1|0}1=0.0$|
|00001110| 2c 20 0a 61 6e 64 20 7b | 5c 74 74 20 78 6d 61 78 |, .and {|\tt xmax|
|00001120| 7d 24 3d 5c 6c 6f 67 5f | 7b 31 30 7d 31 30 30 30 |}$=\log_|{10}1000|
|00001130| 3d 33 2e 30 24 2e 0a 0a | 46 6f 72 20 67 72 65 61 |=3.0$...|For grea|
|00001140| 74 65 72 20 63 6f 6e 74 | 72 6f 6c 20 6f 76 65 72 |ter cont|rol over|
|00001150| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00001160| 20 70 6c 6f 74 73 2c 20 | 61 78 69 73 20 6c 61 62 | plots, |axis lab|
|00001170| 65 6c 6c 69 6e 67 20 61 | 6e 64 20 74 69 63 6b 0a |elling a|nd tick.|
|00001180| 69 6e 74 65 72 76 61 6c | 73 2c 20 6d 6f 72 65 20 |interval|s, more |
|00001190| 63 6f 6d 70 6c 65 78 20 | 67 72 61 70 68 73 20 73 |complex |graphs s|
|000011a0| 68 6f 75 6c 64 20 6d 61 | 6b 65 20 75 73 65 20 6f |hould ma|ke use o|
|000011b0| 66 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 73 0a |f the fu|nctions.|
|000011c0| 5c 72 6f 75 7b 70 6c 76 | 70 6f 72 7d 2c 20 5c 72 |\rou{plv|por}, \r|
|000011d0| 6f 75 7b 70 6c 77 69 6e | 64 7d 2c 20 61 6e 64 20 |ou{plwin|d}, and |
|000011e0| 5c 72 6f 75 7b 70 6c 62 | 6f 78 7d 0a 64 65 73 63 |\rou{plb|ox}.desc|
|000011f0| 72 69 62 65 64 20 69 6e | 20 43 68 61 70 74 65 72 |ribed in| Chapter|
|00001200| 20 5c 72 65 66 7b 72 65 | 66 65 72 65 6e 63 65 7d | \ref{re|ference}|
|00001210| 2e 0a 0a 5c 73 65 63 74 | 69 6f 6e 20 7b 4c 61 62 |...\sect|ion {Lab|
|00001220| 65 6c 6c 69 6e 67 20 74 | 68 65 20 67 72 61 70 68 |elling t|he graph|
|00001230| 7d 20 0a 54 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |} .The f|unction |
|00001240| 7b 5c 74 74 20 70 6c 6c | 61 62 7d 20 6d 61 79 20 |{\tt pll|ab} may |
|00001250| 62 65 20 63 61 6c 6c 65 | 64 20 61 66 74 65 72 20 |be calle|d after |
|00001260| 7b 5c 74 74 20 70 6c 65 | 6e 76 7d 20 74 6f 20 77 |{\tt ple|nv} to w|
|00001270| 72 69 74 65 20 6c 61 62 | 65 6c 73 0a 6f 6e 20 74 |rite lab|els.on t|
|00001280| 68 65 20 78 20 61 6e 64 | 20 79 20 61 78 65 73 2c |he x and| y axes,|
|00001290| 20 61 6e 64 20 61 74 20 | 74 68 65 20 74 6f 70 20 | and at |the top |
|000012a0| 6f 66 20 74 68 65 20 70 | 69 63 74 75 72 65 2e 20 |of the p|icture. |
|000012b0| 41 6c 6c 20 74 68 65 0a | 76 61 72 69 61 62 6c 65 |All the.|variable|
|000012c0| 73 20 61 72 65 20 63 68 | 61 72 61 63 74 65 72 20 |s are ch|aracter |
|000012d0| 76 61 72 69 61 62 6c 65 | 73 20 6f 72 20 63 6f 6e |variable|s or con|
|000012e0| 73 74 61 6e 74 73 2e 20 | 54 72 61 69 6c 69 6e 67 |stants. |Trailing|
|000012f0| 20 73 70 61 63 65 73 0a | 61 72 65 20 72 65 6d 6f | spaces.|are remo|
|00001300| 76 65 64 20 61 6e 64 20 | 74 68 65 20 6c 61 62 65 |ved and |the labe|
|00001310| 6c 20 69 73 20 63 65 6e | 74 72 65 64 20 69 6e 20 |l is cen|tred in |
|00001320| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |the appr|opriate |
|00001330| 66 69 65 6c 64 2e 0a 54 | 68 65 20 73 79 6e 74 61 |field..T|he synta|
|00001340| 78 20 66 6f 72 20 7b 5c | 74 74 20 70 6c 6c 61 62 |x for {\|tt pllab|
|00001350| 7d 20 69 73 3a 0a 0a 5c | 6e 61 6d 65 7b 70 6c 6c |} is:..\|name{pll|
|00001360| 61 62 28 78 6c 62 6c 2c | 79 6c 62 6c 2c 74 6f 70 |ab(xlbl,|ylbl,top|
|00001370| 6c 62 6c 29 3b 7d 0a 5c | 61 72 67 75 7b 7b 5c 74 |lbl);}.\|argu{{\t|
|00001380| 74 20 78 6c 62 6c 7d 20 | 28 63 68 61 72 20 2a 2c |t xlbl} |(char *,|
|00001390| 20 69 6e 70 75 74 29 7d | 0a 7b 50 6f 69 6e 74 65 | input)}|.{Pointe|
|000013a0| 72 20 74 6f 20 73 74 72 | 69 6e 67 20 77 69 74 68 |r to str|ing with|
|000013b0| 20 6c 61 62 65 6c 20 66 | 6f 72 20 74 68 65 20 58 | label f|or the X|
|000013c0| 2d 61 78 69 73 20 28 62 | 6f 74 74 6f 6d 20 6f 66 |-axis (b|ottom of|
|000013d0| 20 67 72 61 70 68 29 2e | 7d 0a 5c 61 72 67 75 7b | graph).|}.\argu{|
|000013e0| 7b 5c 74 74 20 79 6c 62 | 6c 7d 20 28 63 68 61 72 |{\tt ylb|l} (char|
|000013f0| 20 2a 2c 20 69 6e 70 75 | 74 29 7d 0a 7b 50 6f 69 | *, inpu|t)}.{Poi|
|00001400| 6e 74 65 72 20 74 6f 20 | 73 74 72 69 6e 67 20 77 |nter to |string w|
|00001410| 69 74 68 20 6c 61 62 65 | 6c 20 66 6f 72 20 74 68 |ith labe|l for th|
|00001420| 65 20 59 2d 61 78 69 73 | 20 28 6c 65 66 74 20 6f |e Y-axis| (left o|
|00001430| 66 20 67 72 61 70 68 29 | 2e 7d 0a 5c 61 72 67 75 |f graph)|.}.\argu|
|00001440| 7b 7b 5c 74 74 20 74 6f | 70 6c 62 6c 7d 20 28 63 |{{\tt to|plbl} (c|
|00001450| 68 61 72 20 2a 2c 20 69 | 6e 70 75 74 29 7d 0a 7b |har *, i|nput)}.{|
|00001460| 50 6f 69 6e 74 65 72 20 | 74 6f 20 73 74 72 69 6e |Pointer |to strin|
|00001470| 67 20 77 69 74 68 20 6c | 61 62 65 6c 20 66 6f 72 |g with l|abel for|
|00001480| 20 74 68 65 20 70 6c 6f | 74 20 28 74 6f 70 20 6f | the plo|t (top o|
|00001490| 66 20 70 69 63 74 75 72 | 65 29 2e 7d 0a 0a 4d 6f |f pictur|e).}..Mo|
|000014a0| 72 65 20 63 6f 6d 70 6c | 65 78 20 6c 61 62 65 6c |re compl|ex label|
|000014b0| 73 20 63 61 6e 20 62 65 | 20 64 72 61 77 6e 20 75 |s can be| drawn u|
|000014c0| 73 69 6e 67 20 74 68 65 | 20 66 75 6e 63 74 69 6f |sing the| functio|
|000014d0| 6e 20 72 6f 75 7b 70 6c | 6d 74 65 78 7d 2e 0a 53 |n rou{pl|mtex}..S|
|000014e0| 65 65 20 61 6c 73 6f 20 | 53 65 63 74 69 6f 6e 20 |ee also |Section |
|000014f0| 5c 72 65 66 7b 67 72 61 | 70 68 2d 74 65 78 74 7d |\ref{gra|ph-text}|
|00001500| 20 6f 6e 20 70 61 67 65 | 0a 5c 70 61 67 65 72 65 | on page|.\pagere|
|00001510| 66 7b 67 72 61 70 68 2d | 74 65 78 74 7d 20 66 6f |f{graph-|text} fo|
|00001520| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |r inform|ation ab|
|00001530| 6f 75 74 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |out the |function|
|00001540| 20 7b 5c 74 74 20 70 6c | 70 74 65 78 7d 20 77 68 | {\tt pl|ptex} wh|
|00001550| 69 63 68 0a 77 72 69 74 | 65 73 20 6c 61 62 65 6c |ich.writ|es label|
|00001560| 73 20 77 69 74 68 69 6e | 20 61 20 67 72 61 70 68 |s within| a graph|
|00001570| 2e 0a 0a 5c 73 65 63 74 | 69 6f 6e 20 7b 44 72 61 |...\sect|ion {Dra|
|00001580| 77 69 6e 67 20 74 68 65 | 20 47 72 61 70 68 7d 0a |wing the| Graph}.|
|00001590| 0a 50 4c 50 4c 4f 54 20 | 63 61 6e 20 64 72 61 77 |.PLPLOT |can draw|
|000015a0| 20 67 72 61 70 68 73 20 | 63 6f 6e 73 69 73 74 69 | graphs |consisti|
|000015b0| 6e 67 20 6f 66 20 70 6f | 69 6e 74 73 20 77 69 74 |ng of po|ints wit|
|000015c0| 68 20 6f 70 74 69 6f 6e | 61 6c 20 65 72 72 6f 72 |h option|al error|
|000015d0| 20 62 61 72 73 2c 0a 6c | 69 6e 65 20 73 65 67 6d | bars,.l|ine segm|
|000015e0| 65 6e 74 73 20 6f 72 20 | 68 69 73 74 6f 67 72 61 |ents or |histogra|
|000015f0| 6d 73 2e 20 46 75 6e 63 | 74 69 6f 6e 73 20 77 68 |ms. Func|tions wh|
|00001600| 69 63 68 20 70 65 72 66 | 6f 72 6d 20 65 61 63 68 |ich perf|orm each|
|00001610| 20 6f 66 20 74 68 65 73 | 65 0a 61 63 74 69 6f 6e | of thes|e.action|
|00001620| 73 20 6d 61 79 20 62 65 | 20 63 61 6c 6c 65 64 20 |s may be| called |
|00001630| 61 66 74 65 72 20 73 65 | 74 74 69 6e 67 20 75 70 |after se|tting up|
|00001640| 20 74 68 65 20 70 6c 6f | 74 74 69 6e 67 20 65 6e | the plo|tting en|
|00001650| 76 69 72 6f 6e 6d 65 6e | 74 20 0a 75 73 69 6e 67 |vironmen|t .using|
|00001660| 20 7b 5c 74 74 20 70 6c | 65 6e 76 7d 2e 20 41 6c | {\tt pl|env}. Al|
|00001670| 6c 20 6f 66 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |l of the| followi|
|00001680| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 73 20 64 72 61 |ng funct|ions dra|
|00001690| 77 20 77 69 74 68 69 6e | 20 74 68 65 20 62 6f 78 |w within| the box|
|000016a0| 20 0a 64 65 66 69 6e 65 | 64 20 62 79 20 7b 5c 74 | .define|d by {\t|
|000016b0| 74 20 70 6c 65 6e 76 7d | 2c 20 61 6e 64 20 61 6e |t plenv}|, and an|
|000016c0| 79 20 6c 69 6e 65 73 20 | 63 72 6f 73 73 69 6e 67 |y lines |crossing|
|000016d0| 20 74 68 65 20 62 6f 75 | 6e 64 61 72 79 20 61 72 | the bou|ndary ar|
|000016e0| 65 20 63 6c 69 70 70 65 | 64 2e 0a 46 75 6e 63 74 |e clippe|d..Funct|
|000016f0| 69 6f 6e 73 20 61 72 65 | 20 61 6c 73 6f 20 70 72 |ions are| also pr|
|00001700| 6f 76 69 64 65 64 20 66 | 6f 72 20 64 72 61 77 69 |ovided f|or drawi|
|00001710| 6e 67 20 73 75 72 66 61 | 63 65 20 61 6e 64 20 63 |ng surfa|ce and c|
|00001720| 6f 6e 74 6f 75 72 20 72 | 65 70 72 65 73 65 6e 74 |ontour r|epresent|
|00001730| 61 74 69 6f 6e 73 0a 6f | 66 20 6d 75 6c 74 69 2d |ations.o|f multi-|
|00001740| 64 69 6d 65 6e 73 69 6f | 6e 61 6c 20 66 75 6e 63 |dimensio|nal func|
|00001750| 74 69 6f 6e 73 2e 20 54 | 68 65 73 65 20 61 72 65 |tions. T|hese are|
|00001760| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 0a 43 | describ|ed in .C|
|00001770| 68 61 70 74 65 72 20 5c | 72 65 66 7b 61 64 76 61 |hapter \|ref{adva|
|00001780| 6e 63 65 64 7d 2e 0a 0a | 5c 73 75 62 73 65 63 74 |nced}...|\subsect|
|00001790| 69 6f 6e 20 7b 44 72 61 | 77 69 6e 67 20 50 6f 69 |ion {Dra|wing Poi|
|000017a0| 6e 74 73 7d 0a 7b 5c 74 | 74 20 70 6c 70 6f 69 6e |nts}.{\t|t plpoin|
|000017b0| 7d 20 61 6e 64 20 7b 5c | 74 74 20 70 6c 73 79 6d |} and {\|tt plsym|
|000017c0| 7d 20 6d 61 72 6b 20 6f | 75 74 20 7b 5c 74 74 20 |} mark o|ut {\tt |
|000017d0| 6e 7d 20 70 6f 69 6e 74 | 73 20 0a 7b 5c 74 74 20 |n} point|s .{\tt |
|000017e0| 28 78 5b 69 5d 2c 79 5b | 69 5d 29 7d 20 77 69 74 |(x[i],y[|i])} wit|
|000017f0| 68 20 74 68 65 20 0a 73 | 70 65 63 69 66 69 65 64 |h the .s|pecified|
|00001800| 20 73 79 6d 62 6f 6c 2e | 20 54 68 65 20 72 6f 75 | symbol.| The rou|
|00001810| 74 69 6e 65 73 20 64 69 | 66 66 65 72 20 6f 6e 6c |tines di|ffer onl|
|00001820| 79 20 69 6e 20 74 68 65 | 20 69 6e 74 65 72 70 72 |y in the| interpr|
|00001830| 65 74 61 74 69 6f 6e 20 | 0a 6f 66 20 74 68 65 20 |etation |.of the |
|00001840| 73 79 6d 62 6f 6c 20 0a | 63 6f 64 65 73 2e 20 7b |symbol .|codes. {|
|00001850| 5c 74 74 20 70 6c 70 6f | 69 6e 7d 20 75 73 65 73 |\tt plpo|in} uses|
|00001860| 20 61 6e 20 65 78 74 65 | 6e 64 65 64 20 41 53 43 | an exte|nded ASC|
|00001870| 49 49 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |II repre|sentatio|
|00001880| 6e 2c 20 77 69 74 68 20 | 74 68 65 20 0a 70 72 69 |n, with |the .pri|
|00001890| 6e 74 61 62 6c 65 20 0a | 41 53 43 49 49 20 63 6f |ntable .|ASCII co|
|000018a0| 64 65 73 20 6d 61 70 70 | 69 6e 67 20 74 6f 20 74 |des mapp|ing to t|
|000018b0| 68 65 20 72 65 73 70 65 | 63 74 69 76 65 20 63 68 |he respe|ctive ch|
|000018c0| 61 72 61 63 74 65 72 73 | 20 69 6e 20 74 68 65 20 |aracters| in the |
|000018d0| 63 75 72 72 65 6e 74 20 | 66 6f 6e 74 2c 20 61 6e |current |font, an|
|000018e0| 64 20 0a 74 68 65 20 63 | 6f 64 65 73 20 66 72 6f |d .the c|odes fro|
|000018f0| 6d 20 30 2d 33 31 20 6d | 61 70 70 69 6e 67 20 74 |m 0-31 m|apping t|
|00001900| 6f 20 76 61 72 69 6f 75 | 73 20 75 73 65 66 75 6c |o variou|s useful|
|00001910| 20 73 79 6d 62 6f 6c 73 | 2e 20 0a 49 6e 20 7b 5c | symbols|. .In {\|
|00001920| 74 74 20 70 6c 73 79 6d | 7d 20 68 6f 77 65 76 65 |tt plsym|} howeve|
|00001930| 72 2c 20 0a 74 68 65 20 | 63 6f 64 65 20 69 73 20 |r, .the |code is |
|00001940| 61 20 48 65 72 73 68 65 | 79 20 66 6f 6e 74 20 63 |a Hershe|y font c|
|00001950| 6f 64 65 20 6e 75 6d 62 | 65 72 2e 20 45 78 61 6d |ode numb|er. Exam|
|00001960| 70 6c 65 20 70 72 6f 67 | 72 61 6d 73 20 61 72 65 |ple prog|rams are|
|00001970| 20 70 72 6f 76 69 64 65 | 64 0a 77 68 69 63 68 20 | provide|d.which |
|00001980| 64 69 73 70 6c 61 79 20 | 65 61 63 68 20 6f 66 20 |display |each of |
|00001990| 74 68 65 20 73 79 6d 62 | 6f 6c 73 20 61 76 61 69 |the symb|ols avai|
|000019a0| 6c 61 62 6c 65 20 75 73 | 69 6e 67 20 74 68 65 73 |lable us|ing thes|
|000019b0| 65 20 72 6f 75 74 69 6e | 65 73 2e 0a 20 0a 5c 6e |e routin|es.. .\n|
|000019c0| 61 6d 65 7b 70 6c 70 6f | 69 6e 28 6e 2c 78 2c 79 |ame{plpo|in(n,x,y|
|000019d0| 2c 63 6f 64 65 29 3b 20 | 7b 5c 72 6d 20 61 6e 64 |,code); |{\rm and|
|000019e0| 20 7d 20 70 6c 73 79 6d | 28 6e 2c 78 2c 79 2c 63 | } plsym|(n,x,y,c|
|000019f0| 6f 64 65 29 3b 7d 0a 5c | 61 72 67 75 7b 7b 5c 74 |ode);}.\|argu{{\t|
|00001a00| 74 20 6e 7d 20 28 69 6e | 74 2c 20 69 6e 70 75 74 |t n} (in|t, input|
|00001a10| 29 7d 0a 7b 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |)}.{the |number o|
|00001a20| 66 20 70 6f 69 6e 74 73 | 20 74 6f 20 70 6c 6f 74 |f points| to plot|
|00001a30| 2e 7d 0a 5c 61 72 67 75 | 7b 7b 5c 74 74 20 78 2c |.}.\argu|{{\tt x,|
|00001a40| 20 79 7d 20 28 66 6c 6f | 61 74 20 2a 2c 20 69 6e | y} (flo|at *, in|
|00001a50| 70 75 74 29 7d 0a 7b 70 | 6f 69 6e 74 65 72 73 20 |put)}.{p|ointers |
|00001a60| 74 6f 20 61 72 72 61 79 | 73 20 6f 66 20 74 68 65 |to array|s of the|
|00001a70| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 6f 66 20 | coordin|ates of |
|00001a80| 74 68 65 20 7b 5c 74 74 | 20 6e 7d 20 70 6f 69 6e |the {\tt| n} poin|
|00001a90| 74 73 2e 7d 0a 5c 61 72 | 67 75 7b 7b 5c 74 74 20 |ts.}.\ar|gu{{\tt |
|00001aa0| 63 6f 64 65 7d 20 28 69 | 6e 74 2c 20 69 6e 70 75 |code} (i|nt, inpu|
|00001ab0| 74 29 7d 0a 7b 63 6f 64 | 65 20 6e 75 6d 62 65 72 |t)}.{cod|e number|
|00001ac0| 20 6f 66 20 73 79 6d 62 | 6f 6c 20 74 6f 20 64 72 | of symb|ol to dr|
|00001ad0| 61 77 2e 7d 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |aw.}..\s|ubsectio|
|00001ae0| 6e 20 7b 44 72 61 77 69 | 6e 67 20 4c 69 6e 65 73 |n {Drawi|ng Lines|
|00001af0| 20 6f 72 20 43 75 72 76 | 65 73 7d 0a 0a 50 4c 50 | or Curv|es}..PLP|
|00001b00| 4c 4f 54 20 70 72 6f 76 | 69 64 65 73 20 74 77 6f |LOT prov|ides two|
|00001b10| 20 66 75 6e 63 74 69 6f | 6e 73 20 66 6f 72 20 64 | functio|ns for d|
|00001b20| 72 61 77 69 6e 67 20 6c | 69 6e 65 20 67 72 61 70 |rawing l|ine grap|
|00001b30| 68 73 2e 20 0a 41 6c 6c | 20 6c 69 6e 65 73 20 61 |hs. .All| lines a|
|00001b40| 72 65 20 64 72 61 77 6e | 20 69 6e 0a 74 68 65 20 |re drawn| in.the |
|00001b50| 63 75 72 72 65 6e 74 6c | 79 20 73 65 6c 65 63 74 |currentl|y select|
|00001b60| 65 64 20 63 6f 6c 6f 72 | 20 61 6e 64 20 6c 69 6e |ed color| and lin|
|00001b70| 65 20 73 74 79 6c 65 2e | 20 53 65 65 20 70 61 67 |e style.| See pag|
|00001b80| 65 20 5c 70 61 67 65 72 | 65 66 7b 63 6f 6c 6f 75 |e \pager|ef{colou|
|00001b90| 72 7d 20 69 6e 0a 53 65 | 63 74 69 6f 6e 20 5c 72 |r} in.Se|ction \r|
|00001ba0| 65 66 7b 63 6f 6c 6f 75 | 72 7d 20 61 6e 64 20 70 |ef{colou|r} and p|
|00001bb0| 61 67 65 20 5c 70 61 67 | 65 72 65 66 7b 73 74 79 |age \pag|eref{sty|
|00001bc0| 6c 65 7d 20 69 6e 20 53 | 65 63 74 69 6f 6e 20 5c |le} in S|ection \|
|00001bd0| 72 65 66 7b 73 74 79 6c | 65 7d 20 66 6f 72 0a 69 |ref{styl|e} for.i|
|00001be0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|00001bf0| 20 63 68 61 6e 67 69 6e | 67 20 74 68 65 73 65 20 | changin|g these |
|00001c00| 70 61 72 61 6d 65 74 65 | 72 73 2e 0a 0a 7b 5c 74 |paramete|rs...{\t|
|00001c10| 74 20 70 6c 6c 69 6e 65 | 7d 20 64 72 61 77 73 20 |t plline|} draws |
|00001c20| 61 20 6c 69 6e 65 20 6f | 72 20 63 75 72 76 65 2e |a line o|r curve.|
|00001c30| 20 54 68 65 20 63 75 72 | 76 65 20 63 6f 6e 73 69 | The cur|ve consi|
|00001c40| 73 74 73 20 6f 66 20 7b | 5c 74 74 20 6e 2d 31 7d |sts of {|\tt n-1}|
|00001c50| 20 6c 69 6e 65 20 0a 73 | 65 67 6d 65 6e 74 73 20 | line .s|egments |
|00001c60| 6a 6f 69 6e 69 6e 67 20 | 74 68 65 20 7b 5c 74 74 |joining |the {\tt|
|00001c70| 20 6e 7d 20 70 6f 69 6e | 74 73 20 69 6e 20 74 68 | n} poin|ts in th|
|00001c80| 65 20 69 6e 70 75 74 20 | 61 72 72 61 79 73 2e 20 |e input |arrays. |
|00001c90| 46 6f 72 20 73 69 6e 67 | 6c 65 20 6c 69 6e 65 0a |For sing|le line.|
|00001ca0| 73 65 67 6d 65 6e 74 73 | 2c 20 7b 5c 74 74 20 70 |segments|, {\tt p|
|00001cb0| 6c 6a 6f 69 6e 7d 20 69 | 73 20 75 73 65 64 20 74 |ljoin} i|s used t|
|00001cc0| 6f 20 6a 6f 69 6e 20 74 | 77 6f 20 70 6f 69 6e 74 |o join t|wo point|
|00001cd0| 73 2e 0a 0a 5c 6e 61 6d | 65 7b 70 6c 6c 69 6e 65 |s...\nam|e{plline|
|00001ce0| 28 6e 2c 78 2c 79 29 3b | 7d 0a 5c 61 72 67 75 7b |(n,x,y);|}.\argu{|
|00001cf0| 7b 5c 74 74 20 6e 7d 20 | 28 69 6e 74 2c 20 69 6e |{\tt n} |(int, in|
|00001d00| 70 75 74 29 7d 0a 7b 74 | 68 65 20 6e 75 6d 62 65 |put)}.{t|he numbe|
|00001d10| 72 20 6f 66 20 70 6f 69 | 6e 74 73 2e 7d 0a 5c 61 |r of poi|nts.}.\a|
|00001d20| 72 67 75 7b 7b 5c 74 74 | 20 78 2c 20 79 7d 20 28 |rgu{{\tt| x, y} (|
|00001d30| 66 6c 6f 61 74 20 2a 2c | 20 69 6e 70 75 74 29 7d |float *,| input)}|
|00001d40| 0a 7b 70 6f 69 6e 74 65 | 72 73 20 74 6f 20 61 72 |.{pointe|rs to ar|
|00001d50| 72 61 79 73 20 77 69 74 | 68 20 63 6f 6f 72 64 69 |rays wit|h coordi|
|00001d60| 6e 61 74 65 73 20 6f 66 | 20 74 68 65 20 7b 5c 74 |nates of| the {\t|
|00001d70| 74 20 6e 7d 20 70 6f 69 | 6e 74 73 2e 7d 0a 0a 5c |t n} poi|nts.}..\|
|00001d80| 6e 61 6d 65 7b 70 6c 6a | 6f 69 6e 28 78 31 2c 79 |name{plj|oin(x1,y|
|00001d90| 31 2c 78 32 2c 79 32 29 | 3b 7d 0a 5c 61 72 67 75 |1,x2,y2)|;}.\argu|
|00001da0| 7b 7b 5c 74 74 20 78 31 | 2c 20 79 31 7d 20 28 66 |{{\tt x1|, y1} (f|
|00001db0| 6c 6f 61 74 2c 20 69 6e | 70 75 74 29 7d 0a 7b 63 |loat, in|put)}.{c|
|00001dc0| 6f 6f 72 64 69 6e 61 74 | 65 73 20 6f 66 20 74 68 |oordinat|es of th|
|00001dd0| 65 20 66 69 72 73 74 20 | 70 6f 69 6e 74 2e 7d 0a |e first |point.}.|
|00001de0| 5c 61 72 67 75 7b 7b 5c | 74 74 20 78 32 2c 20 79 |\argu{{\|tt x2, y|
|00001df0| 32 7d 20 28 66 6c 6f 61 | 74 2c 20 69 6e 70 75 74 |2} (floa|t, input|
|00001e00| 29 7d 0a 7b 63 6f 6f 72 | 64 69 6e 61 74 65 73 20 |)}.{coor|dinates |
|00001e10| 6f 66 20 74 68 65 20 73 | 65 63 6f 6e 64 20 70 6f |of the s|econd po|
|00001e20| 69 6e 74 2e 7d 0a 0a 5c | 73 75 62 73 65 63 74 69 |int.}..\|subsecti|
|00001e30| 6f 6e 20 7b 57 72 69 74 | 69 6e 67 20 54 65 78 74 |on {Writ|ing Text|
|00001e40| 20 6f 6e 20 61 20 47 72 | 61 70 68 7d 20 5c 6c 61 | on a Gr|aph} \la|
|00001e50| 62 65 6c 20 7b 67 72 61 | 70 68 2d 74 65 78 74 7d |bel {gra|ph-text}|
|00001e60| 0a 0a 7b 5c 74 74 20 70 | 6c 70 74 65 78 7d 20 61 |..{\tt p|lptex} a|
|00001e70| 6c 6c 6f 77 73 20 74 65 | 78 74 20 74 6f 20 62 65 |llows te|xt to be|
|00001e80| 20 77 72 69 74 74 65 6e | 20 77 69 74 68 69 6e 20 | written| within |
|00001e90| 74 68 65 20 6c 69 6d 69 | 74 73 20 73 65 74 20 62 |the limi|ts set b|
|00001ea0| 79 20 0a 7b 5c 74 74 20 | 70 6c 65 6e 76 7d 2e 20 |y .{\tt |plenv}. |
|00001eb0| 54 68 65 20 72 65 66 65 | 72 65 6e 63 65 20 70 6f |The refe|rence po|
|00001ec0| 69 6e 74 20 6f 66 20 61 | 20 74 65 78 74 20 73 74 |int of a| text st|
|00001ed0| 72 69 6e 67 20 6d 61 79 | 20 62 65 20 6c 6f 63 61 |ring may| be loca|
|00001ee0| 74 65 64 20 0a 61 6e 79 | 77 68 65 72 65 20 61 6c |ted .any|where al|
|00001ef0| 6f 6e 67 20 61 6e 20 69 | 6d 61 67 69 6e 61 72 79 |ong an i|maginary|
|00001f00| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 6c 69 6e 65 | horizon|tal line|
|00001f10| 20 70 61 73 73 69 6e 67 | 20 74 68 72 6f 75 67 68 | passing| through|
|00001f20| 20 74 68 65 20 73 74 72 | 69 6e 67 20 0a 61 74 20 | the str|ing .at |
|00001f30| 68 61 6c 66 20 74 68 65 | 20 68 65 69 67 68 74 20 |half the| height |
|00001f40| 6f 66 20 61 20 63 61 70 | 69 74 61 6c 20 6c 65 74 |of a cap|ital let|
|00001f50| 74 65 72 2e 20 54 68 65 | 20 70 61 72 61 6d 65 74 |ter. The| paramet|
|00001f60| 65 72 20 22 6a 75 73 74 | 22 20 73 70 65 63 69 66 |er "just|" specif|
|00001f70| 69 65 73 20 0a 77 68 65 | 72 65 20 61 6c 6f 6e 67 |ies .whe|re along|
|00001f80| 20 74 68 69 73 20 6c 69 | 6e 65 20 74 68 65 20 72 | this li|ne the r|
|00001f90| 65 66 65 72 65 6e 63 65 | 20 70 6f 69 6e 74 20 69 |eference| point i|
|00001fa0| 73 20 6c 6f 63 61 74 65 | 64 2e 20 54 68 65 20 73 |s locate|d. The s|
|00001fb0| 74 72 69 6e 67 20 69 73 | 20 74 68 65 6e 0a 72 6f |tring is| then.ro|
|00001fc0| 74 61 74 65 64 20 61 62 | 6f 75 74 20 74 68 65 20 |tated ab|out the |
|00001fd0| 72 65 66 65 72 65 6e 63 | 65 20 70 6f 69 6e 74 20 |referenc|e point |
|00001fe0| 74 68 72 6f 75 67 68 20 | 61 6e 20 61 6e 67 6c 65 |through |an angle|
|00001ff0| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 74 68 | specifi|ed by th|
|00002000| 65 0a 70 61 72 61 6d 65 | 74 65 72 73 20 7b 5c 74 |e.parame|ters {\t|
|00002010| 74 20 64 78 7d 20 61 6e | 64 20 7b 5c 74 74 20 64 |t dx} an|d {\tt d|
|00002020| 79 7d 2c 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |y}, so t|hat the |
|00002030| 73 74 72 69 6e 67 20 62 | 65 63 6f 6d 65 73 20 70 |string b|ecomes p|
|00002040| 61 72 61 6c 6c 65 6c 20 | 0a 74 6f 20 61 20 6c 69 |arallel |.to a li|
|00002050| 6e 65 20 6a 6f 69 6e 69 | 6e 67 20 7b 5c 74 74 20 |ne joini|ng {\tt |
|00002060| 28 78 2c 79 29 7d 20 74 | 6f 20 7b 5c 74 74 20 28 |(x,y)} t|o {\tt (|
|00002070| 78 2b 64 78 2c 79 2b 64 | 79 29 7d 2e 0a 0a 5c 6e |x+dx,y+d|y)}...\n|
|00002080| 61 6d 65 7b 70 6c 70 74 | 65 78 28 78 2c 79 2c 64 |ame{plpt|ex(x,y,d|
|00002090| 78 2c 64 79 2c 6a 75 73 | 74 2c 74 65 78 74 29 3b |x,dy,jus|t,text);|
|000020a0| 7d 0a 5c 61 72 67 75 7b | 7b 5c 74 74 20 78 2c 20 |}.\argu{|{\tt x, |
|000020b0| 79 7d 20 28 66 6c 6f 61 | 74 2c 20 69 6e 70 75 74 |y} (floa|t, input|
|000020c0| 29 7d 0a 7b 63 6f 6f 72 | 64 69 6e 61 74 65 73 20 |)}.{coor|dinates |
|000020d0| 6f 66 20 74 68 65 20 72 | 65 66 65 72 65 6e 63 65 |of the r|eference|
|000020e0| 20 70 6f 69 6e 74 2e 7d | 0a 5c 61 72 67 75 7b 7b | point.}|.\argu{{|
|000020f0| 5c 74 74 20 64 78 2c 20 | 64 79 7d 20 28 66 6c 6f |\tt dx, |dy} (flo|
|00002100| 61 74 2c 20 69 6e 70 75 | 74 29 7d 0a 7b 74 68 65 |at, inpu|t)}.{the|
|00002110| 73 65 20 73 70 65 63 69 | 66 79 20 74 68 65 20 61 |se speci|fy the a|
|00002120| 6e 67 6c 65 20 61 74 20 | 77 68 69 63 68 20 74 68 |ngle at |which th|
|00002130| 65 20 74 65 78 74 20 69 | 73 20 74 6f 20 62 65 20 |e text i|s to be |
|00002140| 70 72 69 6e 74 65 64 2e | 20 54 68 65 20 74 65 78 |printed.| The tex|
|00002150| 74 20 69 73 20 0a 20 77 | 72 69 74 74 65 6e 20 70 |t is . w|ritten p|
|00002160| 61 72 61 6c 6c 65 6c 20 | 74 6f 20 61 20 6c 69 6e |arallel |to a lin|
|00002170| 65 20 6a 6f 69 6e 69 6e | 67 20 74 68 65 20 70 6f |e joinin|g the po|
|00002180| 69 6e 74 73 20 7b 5c 74 | 74 20 28 78 2c 79 29 7d |ints {\t|t (x,y)}|
|00002190| 20 74 6f 20 0a 20 7b 5c | 74 74 20 28 78 2b 64 78 | to . {\|tt (x+dx|
|000021a0| 2c 79 2b 64 79 29 7d 20 | 6f 6e 20 74 68 65 20 67 |,y+dy)} |on the g|
|000021b0| 72 61 70 68 2e 7d 0a 5c | 61 72 67 75 7b 7b 5c 74 |raph.}.\|argu{{\t|
|000021c0| 74 20 6a 75 73 74 7d 20 | 28 66 6c 6f 61 74 2c 20 |t just} |(float, |
|000021d0| 69 6e 70 75 74 29 7d 0a | 7b 64 65 74 65 72 6d 69 |input)}.|{determi|
|000021e0| 6e 65 73 20 6a 75 73 74 | 69 66 69 63 61 74 69 6f |nes just|ificatio|
|000021f0| 6e 20 6f 66 20 74 68 65 | 20 73 74 72 69 6e 67 20 |n of the| string |
|00002200| 62 79 20 73 70 65 63 69 | 66 79 69 6e 67 20 77 68 |by speci|fying wh|
|00002210| 69 63 68 20 70 6f 69 6e | 74 20 77 69 74 68 69 6e |ich poin|t within|
|00002220| 0a 20 74 68 65 20 73 74 | 72 69 6e 67 20 69 73 20 |. the st|ring is |
|00002230| 70 6c 61 63 65 64 20 61 | 74 20 74 68 65 20 72 65 |placed a|t the re|
|00002240| 66 65 72 65 6e 63 65 20 | 70 6f 69 6e 74 20 7b 5c |ference |point {\|
|00002250| 74 74 20 28 78 2c 79 29 | 7d 2e 20 54 68 69 73 20 |tt (x,y)|}. This |
|00002260| 70 61 72 61 6d 65 74 65 | 72 0a 20 69 73 20 61 20 |paramete|r. is a |
|00002270| 66 72 61 63 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |fraction| of the |
|00002280| 64 69 73 74 61 6e 63 65 | 20 61 6c 6f 6e 67 20 74 |distance| along t|
|00002290| 68 65 20 73 74 72 69 6e | 67 2e 20 54 68 75 73 20 |he strin|g. Thus |
|000022a0| 69 66 20 7b 5c 74 74 20 | 6a 75 73 74 3d 30 2e 30 |if {\tt |just=0.0|
|000022b0| 7d 2c 20 0a 20 74 68 65 | 20 72 65 66 65 72 65 6e |}, . the| referen|
|000022c0| 63 65 20 70 6f 69 6e 74 | 20 69 73 20 61 74 20 74 |ce point| is at t|
|000022d0| 68 65 20 6c 65 66 74 2d | 68 61 6e 64 20 65 64 67 |he left-|hand edg|
|000022e0| 65 20 6f 66 20 74 68 65 | 20 73 74 72 69 6e 67 2e |e of the| string.|
|000022f0| 0a 20 49 66 20 7b 5c 74 | 74 20 6a 75 73 74 3d 30 |. If {\t|t just=0|
|00002300| 2e 35 7d 2c 20 69 74 20 | 69 73 20 61 74 20 74 68 |.5}, it |is at th|
|00002310| 65 20 63 65 6e 74 65 72 | 20 61 6e 64 20 69 66 20 |e center| and if |
|00002320| 7b 5c 74 74 20 6a 75 73 | 74 3d 31 2e 30 7d 2c 20 |{\tt jus|t=1.0}, |
|00002330| 69 74 20 69 73 20 61 74 | 20 0a 20 74 68 65 20 72 |it is at| . the r|
|00002340| 69 67 68 74 2d 68 61 6e | 64 20 65 64 67 65 2e 7d |ight-han|d edge.}|
|00002350| 0a 5c 61 72 67 75 7b 7b | 5c 74 74 20 74 65 78 74 |.\argu{{|\tt text|
|00002360| 7d 20 28 63 68 61 72 20 | 2a 2c 20 69 6e 70 75 74 |} (char |*, input|
|00002370| 29 7d 0a 7b 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |)}.{poin|ter to t|
|00002380| 68 65 20 73 74 72 69 6e | 67 20 6f 66 20 63 68 61 |he strin|g of cha|
|00002390| 72 61 63 74 65 72 73 20 | 74 6f 20 62 65 20 77 72 |racters |to be wr|
|000023a0| 69 74 74 65 6e 2e 7d 0a | 0a 5c 73 75 62 73 65 63 |itten.}.|.\subsec|
|000023b0| 74 69 6f 6e 20 7b 4d 6f | 72 65 20 43 6f 6d 70 6c |tion {Mo|re Compl|
|000023c0| 65 78 20 47 72 61 70 68 | 73 20 28 48 69 73 74 6f |ex Graph|s (Histo|
|000023d0| 67 72 61 6d 73 20 61 6e | 64 20 45 72 72 6f 72 20 |grams an|d Error |
|000023e0| 42 61 72 73 29 7d 0a 0a | 46 75 6e 63 74 69 6f 6e |Bars)}..|Function|
|000023f0| 73 20 72 6f 75 7b 70 6c | 62 69 6e 7d 20 61 6e 64 |s rou{pl|bin} and|
|00002400| 20 5c 72 6f 75 7b 70 6c | 68 69 73 74 7d 20 61 72 | \rou{pl|hist} ar|
|00002410| 65 20 70 72 6f 76 69 64 | 65 64 20 66 6f 72 0a 64 |e provid|ed for.d|
|00002420| 72 61 77 69 6e 67 20 68 | 69 73 74 6f 67 72 61 6d |rawing h|istogram|
|00002430| 73 2c 20 61 6e 64 20 66 | 75 6e 63 74 69 6f 6e 73 |s, and f|unctions|
|00002440| 20 72 6f 75 7b 70 6c 65 | 72 72 78 7d 0a 61 6e 64 | rou{ple|rrx}.and|
|00002450| 20 5c 72 6f 75 7b 70 6c | 65 72 72 79 7d 20 64 72 | \rou{pl|erry} dr|
|00002460| 61 77 20 65 72 72 6f 72 | 20 62 61 72 73 20 61 62 |aw error| bars ab|
|00002470| 6f 75 74 20 73 70 65 63 | 69 66 69 65 64 0a 70 6f |out spec|ified.po|
|00002480| 69 6e 74 73 2e 20 54 68 | 65 79 20 61 72 65 20 64 |ints. Th|ey are d|
|00002490| 65 73 63 72 69 62 65 64 | 20 69 6e 20 64 65 74 61 |escribed| in deta|
|000024a0| 69 6c 20 69 6e 20 43 68 | 61 70 74 65 72 20 5c 72 |il in Ch|apter \r|
|000024b0| 65 66 7b 72 65 66 65 72 | 65 6e 63 65 7d 2e 0a 0a |ef{refer|ence}...|
|000024c0| 5c 73 65 63 74 69 6f 6e | 20 7b 46 69 6e 69 73 68 |\section| {Finish|
|000024d0| 69 6e 67 20 75 70 7d 0a | 0a 42 65 66 6f 72 65 20 |ing up}.|.Before |
|000024e0| 74 68 65 20 65 6e 64 20 | 6f 66 20 74 68 65 20 70 |the end |of the p|
|000024f0| 72 6f 67 72 61 6d 2c 20 | 61 6c 77 61 79 73 20 63 |rogram, |always c|
|00002500| 61 6c 6c 20 5c 72 6f 75 | 7b 70 6c 65 6e 64 7d 0a |all \rou|{plend}.|
|00002510| 74 6f 20 63 6c 6f 73 65 | 20 61 6e 79 20 6f 75 74 |to close| any out|
|00002520| 70 75 74 20 70 6c 6f 74 | 20 66 69 6c 65 20 61 6e |put plot| file an|
|00002530| 64 20 74 6f 20 66 72 65 | 65 20 75 70 20 61 6e 79 |d to fre|e up any|
|00002540| 20 6d 65 6d 6f 72 79 20 | 74 68 61 74 20 6d 61 79 | memory |that may|
|00002550| 0a 68 61 76 65 20 62 65 | 65 6e 20 61 6c 6c 6f 63 |.have be|en alloc|
|00002560| 61 74 65 64 2e 0a 46 6f | 72 20 64 65 76 69 63 65 |ated..Fo|r device|
|00002570| 73 20 74 68 61 74 20 68 | 61 76 65 20 73 65 70 61 |s that h|ave sepa|
|00002580| 72 61 74 65 20 67 72 61 | 70 68 69 63 73 0a 61 6e |rate gra|phics.an|
|00002590| 64 20 74 65 78 74 20 6d | 6f 64 65 73 2c 20 7b 5c |d text m|odes, {\|
|000025a0| 74 74 20 70 6c 65 6e 64 | 7d 20 61 6c 77 61 79 73 |tt plend|} always|
|000025b0| 20 72 65 73 65 74 73 20 | 74 68 65 20 64 65 76 69 | resets |the devi|
|000025c0| 63 65 20 69 6e 74 6f 20 | 74 65 78 74 20 6d 6f 64 |ce into |text mod|
|000025d0| 65 2e 20 49 66 0a 69 74 | 20 69 73 20 72 65 71 75 |e. If.it| is requ|
|000025e0| 69 72 65 64 20 74 6f 20 | 73 77 69 74 63 68 20 62 |ired to |switch b|
|000025f0| 65 74 77 65 65 6e 20 6d | 6f 64 65 73 20 77 69 74 |etween m|odes wit|
|00002600| 68 69 6e 20 61 20 70 72 | 6f 67 72 61 6d 2c 20 74 |hin a pr|ogram, t|
|00002610| 68 65 20 66 75 6e 63 74 | 69 6f 6e 73 0a 5c 72 6f |he funct|ions.\ro|
|00002620| 75 7b 70 6c 67 72 61 7d | 20 61 6e 64 20 5c 72 6f |u{plgra}| and \ro|
|00002630| 75 7b 70 6c 74 65 78 74 | 7d 20 73 65 74 20 74 68 |u{pltext|} set th|
|00002640| 65 20 64 65 76 69 63 65 | 20 74 6f 20 67 72 61 70 |e device| to grap|
|00002650| 68 69 63 73 20 61 6e 64 | 20 74 65 78 74 20 6d 6f |hics and| text mo|
|00002660| 64 65 73 0a 72 65 73 70 | 65 63 74 69 76 65 6c 79 |des.resp|ectively|
|00002670| 2e 0a 0a 0a | |.... | |
+--------+-------------------------+-------------------------+--------+--------+