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| 54 68 65 20 72 65 73 74 | 20 6f 66 20 74 68 69 73 |The rest| of this|
|00000040| 20 6d 61 6e 75 61 6c 20 | 61 73 73 75 6d 65 73 20 | manual |assumes |
|00000050| 74 68 65 20 72 65 61 64 | 65 72 20 68 61 73 20 73 |the read|er has s|
|00000060| 6f 6d 65 20 66 61 6d 69 | 6c 69 61 72 69 74 79 20 |ome fami|liarity |
|00000070| 77 69 74 68 20 74 68 65 | 0a 43 20 70 72 6f 67 72 |with the|.C progr|
|00000080| 61 6d 6d 69 6e 67 20 6c | 61 6e 67 75 61 67 65 2e |amming l|anguage.|
|00000090| 0a 0a 5c 73 65 63 74 69 | 6f 6e 20 7b 4e 6f 74 61 |..\secti|on {Nota|
|000000a0| 74 69 6f 6e 7d 0a 53 65 | 76 65 72 61 6c 20 6f 66 |tion}.Se|veral of|
|000000b0| 20 74 68 65 20 70 6c 6f | 74 74 69 6e 67 20 72 6f | the plo|tting ro|
|000000c0| 75 74 69 6e 65 73 20 61 | 72 65 20 64 65 73 63 72 |utines a|re descr|
|000000d0| 69 62 65 64 20 69 6e 20 | 74 68 69 73 20 73 65 63 |ibed in |this sec|
|000000e0| 74 69 6f 6e 2e 0a 54 68 | 65 20 76 61 6c 75 65 73 |tion..Th|e values|
|000000f0| 20 70 61 73 73 65 64 20 | 74 6f 20 6f 72 20 72 65 | passed |to or re|
|00000100| 74 75 72 6e 65 64 20 62 | 79 20 74 68 65 20 66 75 |turned b|y the fu|
|00000110| 6e 63 74 69 6f 6e 73 0a | 61 72 65 20 65 69 74 68 |nctions.|are eith|
|00000120| 65 72 20 6f 66 20 74 79 | 70 65 20 63 68 61 72 2c |er of ty|pe char,|
|00000130| 20 50 4c 49 4e 54 2c 20 | 50 4c 46 4c 54 20 6f 72 | PLINT, |PLFLT or|
|00000140| 20 70 6f 69 6e 74 65 72 | 73 20 74 6f 20 6f 6e 65 | pointer|s to one|
|00000150| 20 6f 66 20 74 68 65 73 | 65 20 74 68 72 65 65 0a | of thes|e three.|
|00000160| 74 79 70 65 73 2e 20 50 | 4c 49 4e 54 20 61 6e 64 |types. P|LINT and|
|00000170| 20 50 4c 46 4c 54 20 61 | 72 65 20 74 79 70 65 64 | PLFLT a|re typed|
|00000180| 65 66 27 65 64 20 69 6e | 20 70 6c 70 6c 6f 74 2e |ef'ed in| plplot.|
|00000190| 68 2e 20 50 4c 49 4e 54 | 20 69 73 20 75 73 75 61 |h. PLINT| is usua|
|000001a0| 6c 6c 79 0a 74 79 70 65 | 64 65 66 27 65 64 20 74 |lly.type|def'ed t|
|000001b0| 6f 20 74 68 65 20 6c 6f | 6e 67 65 73 74 20 61 76 |o the lo|ngest av|
|000001c0| 61 69 6c 61 62 6c 65 20 | 69 6e 74 65 72 67 65 72 |ailable |interger|
|000001d0| 20 74 79 70 65 20 28 6c | 6f 6e 67 29 2e 20 50 4c | type (l|ong). PL|
|000001e0| 46 4c 54 20 69 73 0a 74 | 79 70 65 64 65 66 27 65 |FLT is.t|ypedef'e|
|000001f0| 64 20 74 6f 20 65 69 74 | 68 65 72 20 66 6c 6f 61 |d to eit|her floa|
|00000200| 74 20 6f 72 20 64 6f 75 | 62 6c 65 20 28 73 65 65 |t or dou|ble (see|
|00000210| 20 79 6f 75 72 20 6c 6f | 63 61 6c 20 50 4c 50 4c | your lo|cal PLPL|
|00000220| 4f 54 20 67 75 72 75 20 | 74 6f 0a 66 69 6e 64 20 |OT guru |to.find |
|00000230| 6f 75 74 20 77 68 69 63 | 68 21 21 29 2e 0a 0a 5c |out whic|h!!)...\|
|00000240| 73 65 63 74 69 6f 6e 20 | 7b 50 6c 6f 74 74 69 6e |section |{Plottin|
|00000250| 67 20 61 20 53 69 6d 70 | 6c 65 20 47 72 61 70 68 |g a Simp|le Graph|
|00000260| 7d 0a 57 65 20 73 68 61 | 6c 6c 20 66 69 72 73 74 |}.We sha|ll first|
|00000270| 20 63 6f 6e 73 69 64 65 | 72 20 70 6c 6f 74 74 69 | conside|r plotti|
|00000280| 6e 67 20 73 69 6d 70 6c | 65 20 67 72 61 70 68 73 |ng simpl|e graphs|
|00000290| 20 73 68 6f 77 69 6e 67 | 20 74 68 65 20 64 65 70 | showing| the dep|
|000002a0| 65 6e 64 65 6e 63 65 0a | 6f 66 20 6f 6e 65 20 76 |endence.|of one v|
|000002b0| 61 72 69 61 62 6c 65 20 | 75 70 6f 6e 20 61 6e 6f |ariable |upon ano|
|000002c0| 74 68 65 72 2e 20 53 75 | 63 68 20 61 20 67 72 61 |ther. Su|ch a gra|
|000002d0| 70 68 20 6d 61 79 20 62 | 65 20 63 6f 6d 70 6f 73 |ph may b|e compos|
|000002e0| 65 64 20 6f 66 20 73 65 | 76 65 72 61 6c 0a 65 6c |ed of se|veral.el|
|000002f0| 65 6d 65 6e 74 73 3a 0a | 5c 62 65 67 69 6e 7b 69 |ements:.|\begin{i|
|00000300| 74 65 6d 69 7a 65 7d 0a | 20 20 20 5c 69 74 65 6d |temize}.| \item|
|00000310| 20 41 20 62 6f 78 20 77 | 68 69 63 68 20 64 65 66 | A box w|hich def|
|00000320| 69 6e 65 73 20 74 68 65 | 20 72 61 6e 67 65 73 20 |ines the| ranges |
|00000330| 6f 66 20 74 68 65 20 76 | 61 72 69 61 62 6c 65 73 |of the v|ariables|
|00000340| 2c 20 70 65 72 68 61 70 | 73 20 77 69 74 68 20 61 |, perhap|s with a|
|00000350| 78 65 73 0a 20 20 20 20 | 20 20 20 20 20 61 6e 64 |xes. | and|
|00000360| 20 6e 75 6d 65 72 69 63 | 20 6c 61 62 65 6c 73 20 | numeric| labels |
|00000370| 61 6c 6f 6e 67 20 69 74 | 73 20 65 64 67 65 73 2c |along it|s edges,|
|00000380| 0a 20 20 20 5c 69 74 65 | 6d 20 41 20 73 65 74 20 |. \ite|m A set |
|00000390| 6f 66 20 70 6f 69 6e 74 | 73 20 6f 72 20 6c 69 6e |of point|s or lin|
|000003a0| 65 73 20 77 69 74 68 69 | 6e 20 74 68 65 20 62 6f |es withi|n the bo|
|000003b0| 78 20 73 68 6f 77 69 6e | 67 20 74 68 65 20 66 75 |x showin|g the fu|
|000003c0| 6e 63 74 69 6f 6e 61 6c | 0a 20 20 20 20 20 20 20 |nctional|. |
|000003d0| 20 20 64 65 70 65 6e 64 | 65 6e 63 65 2c 0a 20 20 | depend|ence,. |
|000003e0| 20 5c 69 74 65 6d 20 41 | 20 73 65 74 20 6f 66 20 | \item A| set of |
|000003f0| 6c 61 62 65 6c 73 20 66 | 6f 72 20 74 68 65 20 76 |labels f|or the v|
|00000400| 61 72 69 61 62 6c 65 73 | 20 61 6e 64 20 61 20 74 |ariables| and a t|
|00000410| 69 74 6c 65 20 66 6f 72 | 20 74 68 65 20 67 72 61 |itle for| the gra|
|00000420| 70 68 2e 0a 5c 65 6e 64 | 7b 69 74 65 6d 69 7a 65 |ph..\end|{itemize|
|00000430| 7d 0a 49 6e 20 6f 72 64 | 65 72 20 74 6f 20 64 72 |}.In ord|er to dr|
|00000440| 61 77 20 73 75 63 68 20 | 61 20 67 72 61 70 68 2c |aw such |a graph,|
|00000450| 20 69 74 20 69 73 20 6e | 65 63 65 73 73 61 72 79 | it is n|ecessary|
|00000460| 20 74 6f 20 63 61 6c 6c | 20 61 74 20 6c 65 61 73 | to call| at leas|
|00000470| 74 20 66 6f 75 72 20 6f | 66 0a 74 68 65 20 50 4c |t four o|f.the PL|
|00000480| 50 4c 4f 54 20 66 75 6e | 63 74 69 6f 6e 73 3a 0a |PLOT fun|ctions:.|
|00000490| 5c 62 65 67 69 6e 7b 65 | 6e 75 6d 65 72 61 74 65 |\begin{e|numerate|
|000004a0| 7d 0a 20 20 20 5c 69 74 | 65 6d 20 7b 5c 74 74 20 |}. \it|em {\tt |
|000004b0| 70 6c 73 74 61 72 7d 2c | 20 74 6f 20 73 70 65 63 |plstar},| to spec|
|000004c0| 69 66 79 20 74 68 65 20 | 64 65 76 69 63 65 20 79 |ify the |device y|
|000004d0| 6f 75 20 77 61 6e 74 20 | 74 6f 20 70 6c 6f 74 20 |ou want |to plot |
|000004e0| 6f 6e 2c 0a 20 20 20 5c | 69 74 65 6d 20 7b 5c 74 |on,. \|item {\t|
|000004f0| 74 20 70 6c 65 6e 76 7d | 2c 20 74 6f 20 64 65 66 |t plenv}|, to def|
|00000500| 69 6e 65 20 74 68 65 20 | 72 61 6e 67 65 20 61 6e |ine the |range an|
|00000510| 64 20 73 63 61 6c 65 20 | 6f 66 20 74 68 65 20 67 |d scale |of the g|
|00000520| 72 61 70 68 2c 20 61 6e | 64 0a 20 20 20 20 20 20 |raph, an|d. |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 64 72 61 77 20 6c 61 62 | 65 6c 73 2c 20 61 78 65 |draw lab|els, axe|
|00000550| 73 2c 20 65 74 63 2e 2c | 0a 20 20 20 5c 69 74 65 |s, etc.,|. \ite|
|00000560| 6d 20 4f 6e 65 20 6f 72 | 20 6d 6f 72 65 20 63 61 |m One or| more ca|
|00000570| 6c 6c 73 20 74 6f 20 7b | 5c 74 74 20 70 6c 6c 69 |lls to {|\tt plli|
|00000580| 6e 65 7d 20 6f 72 20 7b | 5c 74 74 20 70 6c 70 6f |ne} or {|\tt plpo|
|00000590| 69 6e 7d 20 74 6f 20 64 | 72 61 77 0a 20 20 20 20 |in} to d|raw. |
|000005a0| 20 20 20 20 20 6c 69 6e | 65 73 20 6f 72 20 70 6f | lin|es or po|
|000005b0| 69 6e 74 73 20 61 73 20 | 6e 65 65 64 65 64 2e 20 |ints as |needed. |
|000005c0| 4f 74 68 65 72 20 6d 6f | 72 65 20 63 6f 6d 70 6c |Other mo|re compl|
|000005d0| 65 78 20 72 6f 75 74 69 | 6e 65 73 20 69 6e 63 6c |ex routi|nes incl|
|000005e0| 75 64 65 0a 20 20 20 20 | 20 20 20 20 20 7b 5c 74 |ude. | {\t|
|000005f0| 74 20 70 6c 62 69 6e 7d | 20 61 6e 64 20 7b 5c 74 |t plbin}| and {\t|
|00000600| 74 20 70 6c 68 69 73 74 | 7d 20 74 6f 20 64 72 61 |t plhist|} to dra|
|00000610| 77 20 68 69 73 74 6f 67 | 72 61 6d 73 2c 20 7b 5c |w histog|rams, {\|
|00000620| 74 74 20 70 6c 65 72 72 | 78 7d 20 61 6e 64 0a 20 |tt plerr|x} and. |
|00000630| 20 20 20 20 20 20 20 20 | 7b 5c 74 74 20 70 6c 65 | |{\tt ple|
|00000640| 72 72 79 7d 20 74 6f 20 | 64 72 61 77 20 65 72 72 |rry} to |draw err|
|00000650| 6f 72 2d 62 61 72 73 2c | 20 5c 6c 61 62 65 6c 7b |or-bars,| \label{|
|00000660| 64 72 61 77 7d 0a 20 20 | 20 5c 69 74 65 6d 20 7b |draw}. | \item {|
|00000670| 5c 74 74 20 70 6c 65 6e | 64 7d 2c 20 74 6f 20 63 |\tt plen|d}, to c|
|00000680| 6c 6f 73 65 20 74 68 65 | 20 70 6c 6f 74 2e 0a 5c |lose the| plot..\|
|00000690| 65 6e 64 7b 65 6e 75 6d | 65 72 61 74 65 7d 0a 4d |end{enum|erate}.M|
|000006a0| 6f 72 65 20 74 68 61 6e | 20 6f 6e 65 20 67 72 61 |ore than| one gra|
|000006b0| 70 68 20 63 61 6e 20 62 | 65 20 64 72 61 77 6e 20 |ph can b|e drawn |
|000006c0| 6f 6e 20 61 20 73 69 6e | 67 6c 65 20 73 65 74 20 |on a sin|gle set |
|000006d0| 6f 66 20 61 78 65 73 20 | 62 79 20 6d 61 6b 69 6e |of axes |by makin|
|000006e0| 67 0a 72 65 70 65 61 74 | 65 64 20 63 61 6c 6c 73 |g.repeat|ed calls|
|000006f0| 20 74 6f 20 74 68 65 20 | 72 6f 75 74 69 6e 65 73 | to the |routines|
|00000700| 20 6c 69 73 74 65 64 20 | 69 6e 20 69 74 65 6d 20 | listed |in item |
|00000710| 5c 72 65 66 7b 64 72 61 | 77 7d 20 61 62 6f 76 65 |\ref{dra|w} above|
|00000720| 2e 20 54 68 65 20 72 6f | 75 74 69 6e 65 0a 7b 5c |. The ro|utine.{\|
|00000730| 74 74 20 70 6c 73 74 61 | 72 7d 20 6e 65 65 64 73 |tt plsta|r} needs|
|00000740| 20 74 6f 20 62 65 20 63 | 61 6c 6c 65 64 20 6f 6e | to be c|alled on|
|00000750| 6c 79 20 6f 6e 63 65 2c | 20 75 6e 6c 65 73 73 20 |ly once,| unless |
|00000760| 69 74 20 69 73 20 64 65 | 73 69 72 65 64 20 74 6f |it is de|sired to|
|00000770| 20 73 77 69 74 63 68 0a | 6f 75 74 70 75 74 20 64 | switch.|output d|
|00000780| 65 76 69 63 65 73 20 62 | 65 74 77 65 65 6e 20 70 |evices b|etween p|
|00000790| 61 67 65 73 2e 0a 0a 5c | 73 65 63 74 69 6f 6e 20 |ages...\|section |
|000007a0| 7b 53 74 61 72 74 69 6e | 67 20 50 4c 50 4c 4f 54 |{Startin|g PLPLOT|
|000007b0| 7d 20 5c 6c 61 62 65 6c | 7b 73 74 61 72 74 69 6e |} \label|{startin|
|000007c0| 67 75 70 7d 0a 53 75 62 | 72 6f 75 74 69 6e 65 20 |gup}.Sub|routine |
|000007d0| 7b 5c 74 74 20 70 6c 73 | 74 61 72 7d 20 73 65 6c |{\tt pls|tar} sel|
|000007e0| 65 63 74 73 20 61 20 67 | 72 61 70 68 69 63 73 20 |ects a g|raphics |
|000007f0| 64 65 76 69 63 65 20 6f | 72 20 6f 70 65 6e 73 20 |device o|r opens |
|00000800| 61 20 64 69 73 6b 20 66 | 69 6c 65 20 74 6f 0a 72 |a disk f|ile to.r|
|00000810| 65 63 65 69 76 65 20 61 | 20 70 6c 6f 74 20 66 6f |eceive a| plot fo|
|00000820| 72 20 6c 61 74 65 72 20 | 64 69 73 70 6c 61 79 2e |r later |display.|
|00000830| 20 49 66 20 7b 5c 74 74 | 20 70 6c 73 74 61 72 7d | If {\tt| plstar}|
|00000840| 20 69 73 20 63 61 6c 6c | 65 64 20 61 67 61 69 6e | is call|ed again|
|00000850| 20 64 75 72 69 6e 67 0a | 61 20 70 72 6f 67 72 61 | during.|a progra|
|00000860| 6d 2c 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 6c |m, the p|reviousl|
|00000870| 79 20 6f 70 65 6e 65 64 | 20 66 69 6c 65 20 77 69 |y opened| file wi|
|00000880| 6c 6c 20 62 65 20 63 6c | 6f 73 65 64 2e 20 57 68 |ll be cl|osed. Wh|
|00000890| 65 6e 20 63 61 6c 6c 65 | 64 2c 0a 74 68 65 20 75 |en calle|d,.the u|
|000008a0| 73 65 72 20 69 73 20 70 | 72 6f 6d 70 74 65 64 20 |ser is p|rompted |
|000008b0| 66 6f 72 20 61 20 6e 75 | 6d 62 65 72 20 72 65 70 |for a nu|mber rep|
|000008c0| 72 65 73 65 6e 74 69 6e | 67 20 74 68 65 20 64 65 |resentin|g the de|
|000008d0| 76 69 63 65 20 6f 6e 20 | 77 68 69 63 68 0a 74 68 |vice on |which.th|
|000008e0| 65 20 70 6c 6f 74 20 69 | 73 20 74 6f 20 61 70 70 |e plot i|s to app|
|000008f0| 65 61 72 2e 20 54 68 65 | 20 73 79 6e 74 61 78 20 |ear. The| syntax |
|00000900| 66 6f 72 20 7b 5c 74 74 | 20 70 6c 73 74 61 72 7d |for {\tt| plstar}|
|00000910| 20 69 73 3a 0a 0a 5c 6e | 61 6d 65 7b 70 6c 73 74 | is:..\n|ame{plst|
|00000920| 61 72 28 6e 78 2c 6e 79 | 29 3b 7d 0a 5c 61 72 67 |ar(nx,ny|);}.\arg|
|00000930| 75 7b 7b 5c 74 74 20 6e | 78 2c 20 6e 79 7d 20 28 |u{{\tt n|x, ny} (|
|00000940| 50 4c 49 4e 54 2c 20 69 | 6e 70 75 74 29 7d 0a 7b |PLINT, i|nput)}.{|
|00000950| 54 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 6c |The numb|er of pl|
|00000960| 6f 74 73 20 74 6f 20 61 | 20 70 61 67 65 2e 20 54 |ots to a| page. T|
|00000970| 68 65 20 70 61 67 65 20 | 69 73 20 64 69 76 69 64 |he page |is divid|
|00000980| 65 64 20 69 6e 74 6f 0a | 7b 5c 74 74 20 6e 78 7d |ed into.|{\tt nx}|
|00000990| 7e 24 5c 74 69 6d 65 73 | 24 7e 7b 5c 74 74 20 6e |~$\times|$~{\tt n|
|000009a0| 79 7d 20 73 75 62 70 61 | 67 65 73 2c 20 77 69 74 |y} subpa|ges, wit|
|000009b0| 68 20 7b 5c 74 74 20 6e | 78 7d 20 69 6e 20 74 68 |h {\tt n|x} in th|
|000009c0| 65 20 68 6f 72 69 7a 6f | 6e 74 61 6c 0a 64 69 72 |e horizo|ntal.dir|
|000009d0| 65 63 74 69 6f 6e 2c 20 | 61 6e 64 20 7b 5c 74 74 |ection, |and {\tt|
|000009e0| 20 6e 79 7d 20 69 6e 20 | 74 68 65 20 76 65 72 74 | ny} in |the vert|
|000009f0| 69 63 61 6c 20 64 69 72 | 65 63 74 69 6f 6e 2e 7d |ical dir|ection.}|
|00000a00| 0a 0a 53 75 62 70 61 67 | 65 73 20 61 72 65 20 75 |..Subpag|es are u|
|00000a10| 73 65 66 75 6c 20 66 6f | 72 20 70 6c 61 63 69 6e |seful fo|r placin|
|00000a20| 67 20 73 65 76 65 72 61 | 6c 20 67 72 61 70 68 73 |g severa|l graphs|
|00000a30| 20 6f 6e 20 61 20 70 61 | 67 65 2c 20 62 75 74 20 | on a pa|ge, but |
|00000a40| 61 6c 6c 0a 73 75 62 70 | 61 67 65 73 20 61 72 65 |all.subp|ages are|
|00000a50| 20 63 6f 6e 73 74 72 61 | 69 6e 65 64 20 74 6f 20 | constra|ined to |
|00000a60| 62 65 20 6f 66 20 74 68 | 65 20 73 61 6d 65 20 73 |be of th|e same s|
|00000a70| 69 7a 65 2e 20 46 6f 72 | 20 67 72 65 61 74 65 72 |ize. For| greater|
|00000a80| 20 66 6c 65 78 69 62 69 | 6c 69 74 79 2c 0a 72 65 | flexibi|lity,.re|
|00000a90| 61 64 20 70 61 67 65 20 | 5c 70 61 67 65 72 65 66 |ad page |\pageref|
|00000aa0| 7b 76 69 65 77 70 6f 72 | 74 7d 20 69 6e 20 53 65 |{viewpor|t} in Se|
|00000ab0| 63 74 69 6f 6e 0a 5c 72 | 65 66 7b 76 69 65 77 70 |ction.\r|ef{viewp|
|00000ac0| 6f 72 74 7d 20 77 68 69 | 63 68 20 64 69 73 63 75 |ort} whi|ch discu|
|00000ad0| 73 73 65 73 20 76 69 65 | 77 70 6f 72 74 73 2e 0a |sses vie|wports..|
|00000ae0| 0a 5c 73 65 63 74 69 6f | 6e 7b 44 65 66 69 6e 69 |.\sectio|n{Defini|
|00000af0| 6e 67 20 50 6c 6f 74 20 | 53 63 61 6c 65 73 20 61 |ng Plot |Scales a|
|00000b00| 6e 64 20 41 78 65 73 7d | 0a 54 68 65 20 66 75 6e |nd Axes}|.The fun|
|00000b10| 63 74 69 6f 6e 20 7b 5c | 74 74 20 70 6c 65 6e 76 |ction {\|tt plenv|
|00000b20| 7d 20 69 73 20 75 73 65 | 64 20 74 6f 20 64 65 66 |} is use|d to def|
|00000b30| 69 6e 65 20 74 68 65 20 | 73 63 61 6c 65 73 20 61 |ine the |scales a|
|00000b40| 6e 64 20 61 78 65 73 20 | 66 6f 72 20 73 69 6d 70 |nd axes |for simp|
|00000b50| 6c 65 0a 67 72 61 70 68 | 73 2e 20 7b 5c 74 74 20 |le.graph|s. {\tt |
|00000b60| 70 6c 65 6e 76 7d 20 73 | 74 61 72 74 73 20 61 20 |plenv} s|tarts a |
|00000b70| 6e 65 77 20 70 69 63 74 | 75 72 65 20 6f 6e 20 74 |new pict|ure on t|
|00000b80| 68 65 20 6e 65 78 74 20 | 73 75 62 70 61 67 65 20 |he next |subpage |
|00000b90| 28 6f 72 20 61 20 6e 65 | 77 20 70 61 67 65 0a 69 |(or a ne|w page.i|
|00000ba0| 66 20 6e 65 63 65 73 73 | 61 72 79 29 2c 20 61 6e |f necess|ary), an|
|00000bb0| 64 20 64 65 66 69 6e 65 | 73 20 74 68 65 20 72 61 |d define|s the ra|
|00000bc0| 6e 67 65 73 20 6f 66 20 | 74 68 65 20 76 61 72 69 |nges of |the vari|
|00000bd0| 61 62 6c 65 73 20 72 65 | 71 75 69 72 65 64 2e 20 |ables re|quired. |
|00000be0| 54 68 65 0a 72 6f 75 74 | 69 6e 65 20 77 69 6c 6c |The.rout|ine will|
|00000bf0| 20 61 6c 73 6f 20 64 72 | 61 77 20 61 20 62 6f 78 | also dr|aw a box|
|00000c00| 2c 20 61 78 65 73 2c 20 | 61 6e 64 20 6e 75 6d 65 |, axes, |and nume|
|00000c10| 72 69 63 20 6c 61 62 65 | 6c 73 20 69 66 20 72 65 |ric labe|ls if re|
|00000c20| 71 75 65 73 74 65 64 2e | 0a 54 68 65 20 73 79 6e |quested.|.The syn|
|00000c30| 74 61 78 20 66 6f 72 20 | 7b 5c 74 74 20 70 6c 65 |tax for |{\tt ple|
|00000c40| 6e 76 7d 20 69 73 3a 0a | 0a 5c 6e 61 6d 65 7b 70 |nv} is:.|.\name{p|
|00000c50| 6c 65 6e 76 28 78 6d 69 | 6e 2c 78 6d 61 78 2c 79 |lenv(xmi|n,xmax,y|
|00000c60| 6d 69 6e 2c 79 6d 61 78 | 2c 6a 75 73 74 2c 61 78 |min,ymax|,just,ax|
|00000c70| 69 73 29 3b 7d 0a 5c 61 | 72 67 75 7b 7b 5c 74 74 |is);}.\a|rgu{{\tt|
|00000c80| 20 78 6d 69 6e 2c 20 78 | 6d 61 78 7d 20 28 50 4c | xmin, x|max} (PL|
|00000c90| 46 4c 54 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 54 68 |FLT, inp|ut)}.{Th|
|00000ca0| 65 20 6c 65 66 74 20 61 | 6e 64 20 72 69 67 68 74 |e left a|nd right|
|00000cb0| 20 6c 69 6d 69 74 73 20 | 66 6f 72 20 74 68 65 20 | limits |for the |
|00000cc0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 61 78 69 73 2e |horizont|al axis.|
|00000cd0| 7d 0a 5c 61 72 67 75 7b | 7b 5c 74 74 20 79 6d 69 |}.\argu{|{\tt ymi|
|00000ce0| 6e 2c 20 79 6d 61 78 7d | 20 28 50 4c 46 4c 54 2c |n, ymax}| (PLFLT,|
|00000cf0| 20 69 6e 70 75 74 29 7d | 0a 7b 54 68 65 20 62 6f | input)}|.{The bo|
|00000d00| 74 74 6f 6d 20 61 6e 64 | 20 74 6f 70 20 6c 69 6d |ttom and| top lim|
|00000d10| 69 74 73 20 66 6f 72 20 | 74 68 65 20 76 65 72 74 |its for |the vert|
|00000d20| 69 63 61 6c 20 61 78 69 | 73 2e 7d 0a 5c 61 72 67 |ical axi|s.}.\arg|
|00000d30| 75 7b 7b 5c 74 74 20 6a | 75 73 74 7d 20 28 50 4c |u{{\tt j|ust} (PL|
|00000d40| 49 4e 54 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 54 68 |INT, inp|ut)}.{Th|
|00000d50| 69 73 20 73 68 6f 75 6c | 64 20 62 65 20 7a 65 72 |is shoul|d be zer|
|00000d60| 6f 20 6f 72 20 6f 6e 65 | 2e 20 49 66 20 7b 5c 74 |o or one|. If {\t|
|00000d70| 74 20 6a 75 73 74 7d 20 | 69 73 20 6f 6e 65 2c 20 |t just} |is one, |
|00000d80| 74 68 65 20 73 63 61 6c | 65 73 20 6f 66 20 74 68 |the scal|es of th|
|00000d90| 65 0a 78 2d 61 78 69 73 | 20 61 6e 64 0a 79 2d 61 |e.x-axis| and.y-a|
|00000da0| 78 69 73 20 77 69 6c 6c | 20 62 65 20 74 68 65 20 |xis will| be the |
|00000db0| 73 61 6d 65 20 28 69 6e | 20 75 6e 69 74 73 20 70 |same (in| units p|
|00000dc0| 65 72 20 6d 69 6c 6c 69 | 6d 65 74 65 72 29 3b 20 |er milli|meter); |
|00000dd0| 6f 74 68 65 72 77 69 73 | 65 20 74 68 65 20 61 78 |otherwis|e the ax|
|00000de0| 65 73 20 61 72 65 0a 73 | 63 61 6c 65 64 20 69 6e |es are.s|caled in|
|00000df0| 64 65 70 65 6e 64 65 6e | 74 6c 79 2e 20 54 68 69 |dependen|tly. Thi|
|00000e00| 73 20 70 61 72 61 6d 65 | 74 65 72 20 69 73 20 75 |s parame|ter is u|
|00000e10| 73 65 66 75 6c 20 66 6f | 72 20 65 6e 73 75 72 69 |seful fo|r ensuri|
|00000e20| 6e 67 20 74 68 61 74 20 | 6f 62 6a 65 63 74 73 0a |ng that |objects.|
|00000e30| 73 75 63 68 20 61 73 20 | 63 69 72 63 6c 65 73 20 |such as |circles |
|00000e40| 68 61 76 65 20 74 68 65 | 20 63 6f 72 72 65 63 74 |have the| correct|
|00000e50| 20 61 73 70 65 63 74 20 | 72 61 74 69 6f 20 69 6e | aspect |ratio in|
|00000e60| 20 74 68 65 20 66 69 6e | 61 6c 20 70 6c 6f 74 2e | the fin|al plot.|
|00000e70| 7d 0a 5c 61 72 67 75 7b | 7b 5c 74 74 20 61 78 69 |}.\argu{|{\tt axi|
|00000e80| 73 7d 20 28 50 4c 49 4e | 54 2c 20 69 6e 70 75 74 |s} (PLIN|T, input|
|00000e90| 29 7d 0a 7b 7b 5c 74 74 | 20 61 78 69 73 7d 20 63 |)}.{{\tt| axis} c|
|00000ea0| 6f 6e 74 72 6f 6c 73 20 | 77 68 65 74 68 65 72 20 |ontrols |whether |
|00000eb0| 61 20 62 6f 78 2c 20 74 | 69 63 6b 20 6d 61 72 6b |a box, t|ick mark|
|00000ec0| 73 2c 20 6c 61 62 65 6c | 73 2c 20 61 78 65 73 2c |s, label|s, axes,|
|00000ed0| 20 61 6e 64 2f 6f 72 20 | 61 0a 67 72 69 64 20 61 | and/or |a.grid a|
|00000ee0| 72 65 20 64 72 61 77 6e | 2e 0a 5c 62 65 67 69 6e |re drawn|..\begin|
|00000ef0| 7b 69 74 65 6d 69 7a 65 | 7d 0a 20 20 20 20 20 5c |{itemize|}. \|
|00000f00| 69 74 65 6d 20 7b 5c 74 | 74 20 61 78 69 73 3d 2d |item {\t|t axis=-|
|00000f10| 32 7d 3a 20 4e 6f 20 62 | 6f 78 20 6f 72 20 61 6e |2}: No b|ox or an|
|00000f20| 6e 6f 74 61 74 69 6f 6e | 2e 0a 20 20 20 20 20 5c |notation|.. \|
|00000f30| 69 74 65 6d 20 7b 5c 74 | 74 20 61 78 69 73 3d 2d |item {\t|t axis=-|
|00000f40| 31 7d 3a 20 44 72 61 77 | 20 62 6f 78 20 6f 6e 6c |1}: Draw| box onl|
|00000f50| 79 2e 0a 20 20 20 20 20 | 5c 69 74 65 6d 20 7b 5c |y.. |\item {\|
|00000f60| 74 74 20 61 78 69 73 3d | 20 30 7d 3a 20 44 72 61 |tt axis=| 0}: Dra|
|00000f70| 77 20 62 6f 78 2c 20 6c | 61 62 65 6c 6c 65 64 20 |w box, l|abelled |
|00000f80| 77 69 74 68 20 63 6f 6f | 72 64 69 6e 61 74 65 20 |with coo|rdinate |
|00000f90| 76 61 6c 75 65 73 20 61 | 72 6f 75 6e 64 20 65 64 |values a|round ed|
|00000fa0| 67 65 2e 0a 20 20 20 20 | 20 5c 69 74 65 6d 20 7b |ge.. | \item {|
|00000fb0| 5c 74 74 20 61 78 69 73 | 3d 20 31 7d 3a 20 49 6e |\tt axis|= 1}: In|
|00000fc0| 20 61 64 64 69 74 69 6f | 6e 20 74 6f 20 62 6f 78 | additio|n to box|
|00000fd0| 20 61 6e 64 20 6c 61 62 | 65 6c 73 2c 20 64 72 61 | and lab|els, dra|
|00000fe0| 77 20 74 68 65 20 74 77 | 6f 20 61 78 65 73 0a 20 |w the tw|o axes. |
|00000ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001000| 20 20 20 20 20 20 20 20 | 20 58 3d 30 20 61 6e 64 | | X=0 and|
|00001010| 20 59 3d 30 2e 0a 20 20 | 20 20 20 5c 69 74 65 6d | Y=0.. | \item|
|00001020| 20 7b 5c 74 74 20 61 78 | 69 73 3d 20 32 7d 3a 20 | {\tt ax|is= 2}: |
|00001030| 41 73 20 66 6f 72 20 7b | 5c 74 74 20 61 78 69 73 |As for {|\tt axis|
|00001040| 3d 31 7d 2c 20 62 75 74 | 20 61 6c 73 6f 20 64 72 |=1}, but| also dr|
|00001050| 61 77 20 61 20 67 72 69 | 64 20 61 74 20 74 68 65 |aw a gri|d at the|
|00001060| 20 6d 61 6a 6f 72 20 74 | 69 63 6b 20 69 6e 74 65 | major t|ick inte|
|00001070| 72 76 61 6c 2e 0a 20 20 | 20 20 20 5c 69 74 65 6d |rval.. | \item|
|00001080| 20 7b 5c 74 74 20 61 78 | 69 73 3d 31 30 7d 3a 20 | {\tt ax|is=10}: |
|00001090| 4c 6f 67 61 72 69 74 68 | 6d 69 63 20 58 20 61 78 |Logarith|mic X ax|
|000010a0| 69 73 2c 20 6c 69 6e 65 | 61 72 20 59 20 61 78 69 |is, line|ar Y axi|
|000010b0| 73 2e 0a 20 20 20 20 20 | 5c 69 74 65 6d 20 7b 5c |s.. |\item {\|
|000010c0| 74 74 20 61 78 69 73 3d | 31 31 7d 3a 20 4c 6f 67 |tt axis=|11}: Log|
|000010d0| 61 72 69 74 68 6d 69 63 | 20 58 20 61 78 69 73 2c |arithmic| X axis,|
|000010e0| 20 6c 69 6e 65 61 72 20 | 59 20 61 78 69 73 20 61 | linear |Y axis a|
|000010f0| 6e 64 20 64 72 61 77 20 | 6c 69 6e 65 20 59 3d 30 |nd draw |line Y=0|
|00001100| 2e 0a 20 20 20 20 20 5c | 69 74 65 6d 20 7b 5c 74 |.. \|item {\t|
|00001110| 74 20 61 78 69 73 3d 32 | 30 7d 3a 20 4c 69 6e 65 |t axis=2|0}: Line|
|00001120| 61 72 20 58 20 61 78 69 | 73 2c 20 6c 6f 67 61 72 |ar X axi|s, logar|
|00001130| 69 74 68 6d 69 63 20 59 | 20 61 78 69 73 2e 0a 20 |ithmic Y| axis.. |
|00001140| 20 20 20 20 5c 69 74 65 | 6d 20 7b 5c 74 74 20 61 | \ite|m {\tt a|
|00001150| 78 69 73 3d 32 31 7d 3a | 20 4c 69 6e 65 61 72 20 |xis=21}:| Linear |
|00001160| 58 20 61 78 69 73 2c 20 | 6c 6f 67 61 72 69 74 68 |X axis, |logarith|
|00001170| 6d 69 63 20 59 20 61 78 | 69 73 20 61 6e 64 20 64 |mic Y ax|is and d|
|00001180| 72 61 77 20 6c 69 6e 65 | 20 58 3d 30 2e 0a 20 20 |raw line| X=0.. |
|00001190| 20 20 20 5c 69 74 65 6d | 20 7b 5c 74 74 20 61 78 | \item| {\tt ax|
|000011a0| 69 73 3d 33 30 7d 3a 20 | 4c 6f 67 61 72 69 74 68 |is=30}: |Logarith|
|000011b0| 6d 69 63 20 58 20 61 6e | 64 20 59 20 61 78 65 73 |mic X an|d Y axes|
|000011c0| 2e 0a 5c 65 6e 64 7b 69 | 74 65 6d 69 7a 65 7d 0a |..\end{i|temize}.|
|000011d0| 7d 0a 0a 4e 6f 74 65 3a | 20 4c 6f 67 61 72 69 74 |}..Note:| Logarit|
|000011e0| 68 6d 69 63 20 61 78 65 | 73 20 6f 6e 6c 79 20 61 |hmic axe|s only a|
|000011f0| 66 66 65 63 74 20 74 68 | 65 20 61 70 70 65 61 72 |ffect th|e appear|
|00001200| 61 6e 63 65 20 6f 66 20 | 74 68 65 20 61 78 65 73 |ance of |the axes|
|00001210| 20 61 6e 64 20 74 68 65 | 69 72 0a 6c 61 62 65 6c | and the|ir.label|
|00001220| 73 2c 20 73 6f 20 69 74 | 20 69 73 20 75 70 20 74 |s, so it| is up t|
|00001230| 6f 20 74 68 65 20 75 73 | 65 72 20 74 6f 20 63 6f |o the us|er to co|
|00001240| 6d 70 75 74 65 20 74 68 | 65 20 6c 6f 67 61 72 69 |mpute th|e logari|
|00001250| 74 68 6d 73 20 70 72 69 | 6f 72 20 74 6f 20 70 61 |thms pri|or to pa|
|00001260| 73 73 69 6e 67 0a 74 68 | 65 6d 20 74 6f 20 7b 5c |ssing.th|em to {\|
|00001270| 74 74 20 70 6c 65 6e 76 | 7d 20 61 6e 64 20 61 6e |tt plenv|} and an|
|00001280| 79 20 6f 66 20 74 68 65 | 20 6f 74 68 65 72 20 72 |y of the| other r|
|00001290| 6f 75 74 69 6e 65 73 2e | 20 54 68 75 73 2c 20 69 |outines.| Thus, i|
|000012a0| 66 20 61 20 67 72 61 70 | 68 20 68 61 73 20 61 20 |f a grap|h has a |
|000012b0| 33 2d 63 79 63 6c 65 0a | 6c 6f 67 61 72 69 74 68 |3-cycle.|logarith|
|000012c0| 6d 69 63 20 61 78 69 73 | 20 66 72 6f 6d 20 31 20 |mic axis| from 1 |
|000012d0| 74 6f 20 31 30 30 30 2c | 20 77 65 20 6e 65 65 64 |to 1000,| we need|
|000012e0| 20 74 6f 20 73 65 74 20 | 7b 5c 74 74 20 78 6d 69 | to set |{\tt xmi|
|000012f0| 6e 7d 24 3d 5c 6c 6f 67 | 5f 7b 31 30 7d 31 3d 30 |n}$=\log|_{10}1=0|
|00001300| 2e 30 24 2c 0a 61 6e 64 | 20 7b 5c 74 74 20 78 6d |.0$,.and| {\tt xm|
|00001310| 61 78 7d 24 3d 5c 6c 6f | 67 5f 7b 31 30 7d 31 30 |ax}$=\lo|g_{10}10|
|00001320| 30 30 3d 33 2e 30 24 2e | 0a 0a 46 6f 72 20 67 72 |00=3.0$.|..For gr|
|00001330| 65 61 74 65 72 20 63 6f | 6e 74 72 6f 6c 20 6f 76 |eater co|ntrol ov|
|00001340| 65 72 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |er the s|ize of t|
|00001350| 68 65 20 70 6c 6f 74 73 | 2c 20 61 78 69 73 20 6c |he plots|, axis l|
|00001360| 61 62 65 6c 6c 69 6e 67 | 20 61 6e 64 20 74 69 63 |abelling| and tic|
|00001370| 6b 0a 69 6e 74 65 72 76 | 61 6c 73 2c 20 6d 6f 72 |k.interv|als, mor|
|00001380| 65 20 63 6f 6d 70 6c 65 | 78 20 67 72 61 70 68 73 |e comple|x graphs|
|00001390| 20 73 68 6f 75 6c 64 20 | 6d 61 6b 65 20 75 73 65 | should |make use|
|000013a0| 20 6f 66 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | of the |function|
|000013b0| 73 0a 5c 72 6f 75 7b 70 | 6c 76 70 6f 72 7d 2c 20 |s.\rou{p|lvpor}, |
|000013c0| 5c 72 6f 75 7b 70 6c 77 | 69 6e 64 7d 2c 20 61 6e |\rou{plw|ind}, an|
|000013d0| 64 20 5c 72 6f 75 7b 70 | 6c 62 6f 78 7d 0a 64 65 |d \rou{p|lbox}.de|
|000013e0| 73 63 72 69 62 65 64 20 | 69 6e 20 43 68 61 70 74 |scribed |in Chapt|
|000013f0| 65 72 20 5c 72 65 66 7b | 72 65 66 65 72 65 6e 63 |er \ref{|referenc|
|00001400| 65 7d 2e 0a 0a 5c 73 65 | 63 74 69 6f 6e 20 7b 4c |e}...\se|ction {L|
|00001410| 61 62 65 6c 6c 69 6e 67 | 20 74 68 65 20 47 72 61 |abelling| the Gra|
|00001420| 70 68 7d 0a 54 68 65 20 | 66 75 6e 63 74 69 6f 6e |ph}.The |function|
|00001430| 20 7b 5c 74 74 20 70 6c | 6c 61 62 7d 20 6d 61 79 | {\tt pl|lab} may|
|00001440| 20 62 65 20 63 61 6c 6c | 65 64 20 61 66 74 65 72 | be call|ed after|
|00001450| 20 7b 5c 74 74 20 70 6c | 65 6e 76 7d 20 74 6f 20 | {\tt pl|env} to |
|00001460| 77 72 69 74 65 20 6c 61 | 62 65 6c 73 0a 6f 6e 20 |write la|bels.on |
|00001470| 74 68 65 20 78 20 61 6e | 64 20 79 20 61 78 65 73 |the x an|d y axes|
|00001480| 2c 20 61 6e 64 20 61 74 | 20 74 68 65 20 74 6f 70 |, and at| the top|
|00001490| 20 6f 66 20 74 68 65 20 | 70 69 63 74 75 72 65 2e | of the |picture.|
|000014a0| 20 41 6c 6c 20 74 68 65 | 0a 76 61 72 69 61 62 6c | All the|.variabl|
|000014b0| 65 73 20 61 72 65 20 63 | 68 61 72 61 63 74 65 72 |es are c|haracter|
|000014c0| 20 76 61 72 69 61 62 6c | 65 73 20 6f 72 20 63 6f | variabl|es or co|
|000014d0| 6e 73 74 61 6e 74 73 2e | 20 54 72 61 69 6c 69 6e |nstants.| Trailin|
|000014e0| 67 20 73 70 61 63 65 73 | 0a 61 72 65 20 72 65 6d |g spaces|.are rem|
|000014f0| 6f 76 65 64 20 61 6e 64 | 20 74 68 65 20 6c 61 62 |oved and| the lab|
|00001500| 65 6c 20 69 73 20 63 65 | 6e 74 72 65 64 20 69 6e |el is ce|ntred in|
|00001510| 20 74 68 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 | the app|ropriate|
|00001520| 20 66 69 65 6c 64 2e 0a | 54 68 65 20 73 79 6e 74 | field..|The synt|
|00001530| 61 78 20 66 6f 72 20 7b | 5c 74 74 20 70 6c 6c 61 |ax for {|\tt plla|
|00001540| 62 7d 20 69 73 3a 0a 0a | 5c 6e 61 6d 65 7b 70 6c |b} is:..|\name{pl|
|00001550| 6c 61 62 28 78 6c 62 6c | 2c 79 6c 62 6c 2c 74 6f |lab(xlbl|,ylbl,to|
|00001560| 70 6c 62 6c 29 3b 7d 0a | 5c 61 72 67 75 7b 7b 5c |plbl);}.|\argu{{\|
|00001570| 74 74 20 78 6c 62 6c 7d | 20 28 63 68 61 72 20 2a |tt xlbl}| (char *|
|00001580| 2c 20 69 6e 70 75 74 29 | 7d 0a 7b 50 6f 69 6e 74 |, input)|}.{Point|
|00001590| 65 72 20 74 6f 20 73 74 | 72 69 6e 67 20 77 69 74 |er to st|ring wit|
|000015a0| 68 20 6c 61 62 65 6c 20 | 66 6f 72 20 74 68 65 20 |h label |for the |
|000015b0| 58 2d 61 78 69 73 20 28 | 62 6f 74 74 6f 6d 20 6f |X-axis (|bottom o|
|000015c0| 66 20 67 72 61 70 68 29 | 2e 7d 0a 5c 61 72 67 75 |f graph)|.}.\argu|
|000015d0| 7b 7b 5c 74 74 20 79 6c | 62 6c 7d 20 28 63 68 61 |{{\tt yl|bl} (cha|
|000015e0| 72 20 2a 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 50 6f |r *, inp|ut)}.{Po|
|000015f0| 69 6e 74 65 72 20 74 6f | 20 73 74 72 69 6e 67 20 |inter to| string |
|00001600| 77 69 74 68 20 6c 61 62 | 65 6c 20 66 6f 72 20 74 |with lab|el for t|
|00001610| 68 65 20 59 2d 61 78 69 | 73 20 28 6c 65 66 74 20 |he Y-axi|s (left |
|00001620| 6f 66 20 67 72 61 70 68 | 29 2e 7d 0a 5c 61 72 67 |of graph|).}.\arg|
|00001630| 75 7b 7b 5c 74 74 20 74 | 6f 70 6c 62 6c 7d 20 28 |u{{\tt t|oplbl} (|
|00001640| 63 68 61 72 20 2a 2c 20 | 69 6e 70 75 74 29 7d 0a |char *, |input)}.|
|00001650| 7b 50 6f 69 6e 74 65 72 | 20 74 6f 20 73 74 72 69 |{Pointer| to stri|
|00001660| 6e 67 20 77 69 74 68 20 | 6c 61 62 65 6c 20 66 6f |ng with |label fo|
|00001670| 72 20 74 68 65 20 70 6c | 6f 74 20 28 74 6f 70 20 |r the pl|ot (top |
|00001680| 6f 66 20 70 69 63 74 75 | 72 65 29 2e 7d 0a 0a 4d |of pictu|re).}..M|
|00001690| 6f 72 65 20 63 6f 6d 70 | 6c 65 78 20 6c 61 62 65 |ore comp|lex labe|
|000016a0| 6c 73 20 63 61 6e 20 62 | 65 20 64 72 61 77 6e 20 |ls can b|e drawn |
|000016b0| 75 73 69 6e 67 20 74 68 | 65 20 66 75 6e 63 74 69 |using th|e functi|
|000016c0| 6f 6e 20 5c 72 6f 75 7b | 70 6c 6d 74 65 78 7d 2e |on \rou{|plmtex}.|
|000016d0| 0a 53 65 65 20 61 6c 73 | 6f 20 53 65 63 74 69 6f |.See als|o Sectio|
|000016e0| 6e 20 5c 72 65 66 7b 67 | 72 61 70 68 2d 74 65 78 |n \ref{g|raph-tex|
|000016f0| 74 7d 20 6f 6e 20 70 61 | 67 65 0a 5c 70 61 67 65 |t} on pa|ge.\page|
|00001700| 72 65 66 7b 67 72 61 70 | 68 2d 74 65 78 74 7d 20 |ref{grap|h-text} |
|00001710| 66 6f 72 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |for info|rmation |
|00001720| 61 62 6f 75 74 20 74 68 | 65 20 66 75 6e 63 74 69 |about th|e functi|
|00001730| 6f 6e 20 7b 5c 74 74 20 | 70 6c 70 74 65 78 7d 20 |on {\tt |plptex} |
|00001740| 77 68 69 63 68 0a 77 72 | 69 74 65 73 20 6c 61 62 |which.wr|ites lab|
|00001750| 65 6c 73 20 77 69 74 68 | 69 6e 20 61 20 67 72 61 |els with|in a gra|
|00001760| 70 68 2e 0a 0a 5c 73 65 | 63 74 69 6f 6e 20 7b 44 |ph...\se|ction {D|
|00001770| 72 61 77 69 6e 67 20 74 | 68 65 20 47 72 61 70 68 |rawing t|he Graph|
|00001780| 7d 0a 0a 50 4c 50 4c 4f | 54 20 63 61 6e 20 64 72 |}..PLPLO|T can dr|
|00001790| 61 77 20 67 72 61 70 68 | 73 20 63 6f 6e 73 69 73 |aw graph|s consis|
|000017a0| 74 69 6e 67 20 6f 66 20 | 70 6f 69 6e 74 73 20 77 |ting of |points w|
|000017b0| 69 74 68 20 6f 70 74 69 | 6f 6e 61 6c 20 65 72 72 |ith opti|onal err|
|000017c0| 6f 72 20 62 61 72 73 2c | 0a 6c 69 6e 65 20 73 65 |or bars,|.line se|
|000017d0| 67 6d 65 6e 74 73 20 6f | 72 20 68 69 73 74 6f 67 |gments o|r histog|
|000017e0| 72 61 6d 73 2e 20 46 75 | 6e 63 74 69 6f 6e 73 20 |rams. Fu|nctions |
|000017f0| 77 68 69 63 68 20 70 65 | 72 66 6f 72 6d 20 65 61 |which pe|rform ea|
|00001800| 63 68 20 6f 66 20 74 68 | 65 73 65 0a 61 63 74 69 |ch of th|ese.acti|
|00001810| 6f 6e 73 20 6d 61 79 20 | 62 65 20 63 61 6c 6c 65 |ons may |be calle|
|00001820| 64 20 61 66 74 65 72 20 | 73 65 74 74 69 6e 67 20 |d after |setting |
|00001830| 75 70 20 74 68 65 20 70 | 6c 6f 74 74 69 6e 67 20 |up the p|lotting |
|00001840| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 0a 75 73 69 6e |environm|ent.usin|
|00001850| 67 20 7b 5c 74 74 20 70 | 6c 65 6e 76 7d 2e 20 41 |g {\tt p|lenv}. A|
|00001860| 6c 6c 20 6f 66 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |ll of th|e follow|
|00001870| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 73 20 64 72 |ing func|tions dr|
|00001880| 61 77 20 77 69 74 68 69 | 6e 20 74 68 65 20 62 6f |aw withi|n the bo|
|00001890| 78 0a 64 65 66 69 6e 65 | 64 20 62 79 20 7b 5c 74 |x.define|d by {\t|
|000018a0| 74 20 70 6c 65 6e 76 7d | 2c 20 61 6e 64 20 61 6e |t plenv}|, and an|
|000018b0| 79 20 6c 69 6e 65 73 20 | 63 72 6f 73 73 69 6e 67 |y lines |crossing|
|000018c0| 20 74 68 65 20 62 6f 75 | 6e 64 61 72 79 20 61 72 | the bou|ndary ar|
|000018d0| 65 20 63 6c 69 70 70 65 | 64 2e 0a 46 75 6e 63 74 |e clippe|d..Funct|
|000018e0| 69 6f 6e 73 20 61 72 65 | 20 61 6c 73 6f 20 70 72 |ions are| also pr|
|000018f0| 6f 76 69 64 65 64 20 66 | 6f 72 20 64 72 61 77 69 |ovided f|or drawi|
|00001900| 6e 67 20 73 75 72 66 61 | 63 65 20 61 6e 64 20 63 |ng surfa|ce and c|
|00001910| 6f 6e 74 6f 75 72 20 72 | 65 70 72 65 73 65 6e 74 |ontour r|epresent|
|00001920| 61 74 69 6f 6e 73 0a 6f | 66 20 6d 75 6c 74 69 2d |ations.o|f multi-|
|00001930| 64 69 6d 65 6e 73 69 6f | 6e 61 6c 20 66 75 6e 63 |dimensio|nal func|
|00001940| 74 69 6f 6e 73 2e 20 54 | 68 65 73 65 20 61 72 65 |tions. T|hese are|
|00001950| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 0a 43 68 | describ|ed in.Ch|
|00001960| 61 70 74 65 72 20 5c 72 | 65 66 7b 61 64 76 61 6e |apter \r|ef{advan|
|00001970| 63 65 64 7d 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |ced}...\|subsecti|
|00001980| 6f 6e 20 7b 44 72 61 77 | 69 6e 67 20 50 6f 69 6e |on {Draw|ing Poin|
|00001990| 74 73 7d 0a 7b 5c 74 74 | 20 70 6c 70 6f 69 6e 7d |ts}.{\tt| plpoin}|
|000019a0| 20 61 6e 64 20 7b 5c 74 | 74 20 70 6c 73 79 6d 7d | and {\t|t plsym}|
|000019b0| 20 6d 61 72 6b 20 6f 75 | 74 20 7b 5c 74 74 20 6e | mark ou|t {\tt n|
|000019c0| 7d 20 70 6f 69 6e 74 73 | 0a 7b 5c 74 74 20 28 78 |} points|.{\tt (x|
|000019d0| 5b 69 5d 2c 79 5b 69 5d | 29 7d 20 77 69 74 68 20 |[i],y[i]|)} with |
|000019e0| 74 68 65 0a 73 70 65 63 | 69 66 69 65 64 20 73 79 |the.spec|ified sy|
|000019f0| 6d 62 6f 6c 2e 20 54 68 | 65 20 72 6f 75 74 69 6e |mbol. Th|e routin|
|00001a00| 65 73 20 64 69 66 66 65 | 72 20 6f 6e 6c 79 20 69 |es diffe|r only i|
|00001a10| 6e 20 74 68 65 20 69 6e | 74 65 72 70 72 65 74 61 |n the in|terpreta|
|00001a20| 74 69 6f 6e 0a 6f 66 20 | 74 68 65 20 73 79 6d 62 |tion.of |the symb|
|00001a30| 6f 6c 0a 63 6f 64 65 73 | 2e 20 7b 5c 74 74 20 70 |ol.codes|. {\tt p|
|00001a40| 6c 70 6f 69 6e 7d 20 75 | 73 65 73 20 61 6e 20 65 |lpoin} u|ses an e|
|00001a50| 78 74 65 6e 64 65 64 20 | 41 53 43 49 49 20 72 65 |xtended |ASCII re|
|00001a60| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 2c 20 77 69 |presenta|tion, wi|
|00001a70| 74 68 20 74 68 65 0a 70 | 72 69 6e 74 61 62 6c 65 |th the.p|rintable|
|00001a80| 0a 41 53 43 49 49 20 63 | 6f 64 65 73 20 6d 61 70 |.ASCII c|odes map|
|00001a90| 70 69 6e 67 20 74 6f 20 | 74 68 65 20 72 65 73 70 |ping to |the resp|
|00001aa0| 65 63 74 69 76 65 20 63 | 68 61 72 61 63 74 65 72 |ective c|haracter|
|00001ab0| 73 20 69 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |s in the| current|
|00001ac0| 20 66 6f 6e 74 2c 20 61 | 6e 64 0a 74 68 65 20 63 | font, a|nd.the c|
|00001ad0| 6f 64 65 73 20 66 72 6f | 6d 20 30 2d 33 31 20 6d |odes fro|m 0-31 m|
|00001ae0| 61 70 70 69 6e 67 20 74 | 6f 20 76 61 72 69 6f 75 |apping t|o variou|
|00001af0| 73 20 75 73 65 66 75 6c | 20 73 79 6d 62 6f 6c 73 |s useful| symbols|
|00001b00| 2e 0a 49 6e 20 7b 5c 74 | 74 20 70 6c 73 79 6d 7d |..In {\t|t plsym}|
|00001b10| 20 68 6f 77 65 76 65 72 | 2c 0a 74 68 65 20 63 6f | however|,.the co|
|00001b20| 64 65 20 69 73 20 61 20 | 48 65 72 73 68 65 79 20 |de is a |Hershey |
|00001b30| 66 6f 6e 74 20 63 6f 64 | 65 20 6e 75 6d 62 65 72 |font cod|e number|
|00001b40| 2e 20 45 78 61 6d 70 6c | 65 20 70 72 6f 67 72 61 |. Exampl|e progra|
|00001b50| 6d 73 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 0a |ms are p|rovided.|
|00001b60| 77 68 69 63 68 20 64 69 | 73 70 6c 61 79 20 65 61 |which di|splay ea|
|00001b70| 63 68 20 6f 66 20 74 68 | 65 20 73 79 6d 62 6f 6c |ch of th|e symbol|
|00001b80| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 75 73 69 6e |s availa|ble usin|
|00001b90| 67 20 74 68 65 73 65 20 | 72 6f 75 74 69 6e 65 73 |g these |routines|
|00001ba0| 2e 0a 0a 5c 6e 61 6d 65 | 7b 70 6c 70 6f 69 6e 28 |...\name|{plpoin(|
|00001bb0| 6e 2c 78 2c 79 2c 63 6f | 64 65 29 3b 20 7b 5c 72 |n,x,y,co|de); {\r|
|00001bc0| 6d 20 61 6e 64 20 7d 20 | 70 6c 73 79 6d 28 6e 2c |m and } |plsym(n,|
|00001bd0| 78 2c 79 2c 63 6f 64 65 | 29 3b 7d 0a 5c 61 72 67 |x,y,code|);}.\arg|
|00001be0| 75 7b 7b 5c 74 74 20 6e | 7d 20 28 50 4c 49 4e 54 |u{{\tt n|} (PLINT|
|00001bf0| 2c 20 69 6e 70 75 74 29 | 7d 0a 7b 74 68 65 20 6e |, input)|}.{the n|
|00001c00| 75 6d 62 65 72 20 6f 66 | 20 70 6f 69 6e 74 73 20 |umber of| points |
|00001c10| 74 6f 20 70 6c 6f 74 2e | 7d 0a 5c 61 72 67 75 7b |to plot.|}.\argu{|
|00001c20| 7b 5c 74 74 20 78 2c 20 | 79 7d 20 28 50 4c 46 4c |{\tt x, |y} (PLFL|
|00001c30| 54 20 2a 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 70 6f |T *, inp|ut)}.{po|
|00001c40| 69 6e 74 65 72 73 20 74 | 6f 20 61 72 72 61 79 73 |inters t|o arrays|
|00001c50| 20 6f 66 20 74 68 65 20 | 63 6f 6f 72 64 69 6e 61 | of the |coordina|
|00001c60| 74 65 73 20 6f 66 20 74 | 68 65 20 7b 5c 74 74 20 |tes of t|he {\tt |
|00001c70| 6e 7d 20 70 6f 69 6e 74 | 73 2e 7d 0a 5c 61 72 67 |n} point|s.}.\arg|
|00001c80| 75 7b 7b 5c 74 74 20 63 | 6f 64 65 7d 20 28 50 4c |u{{\tt c|ode} (PL|
|00001c90| 49 4e 54 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 63 6f |INT, inp|ut)}.{co|
|00001ca0| 64 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 73 79 6d |de numbe|r of sym|
|00001cb0| 62 6f 6c 20 74 6f 20 64 | 72 61 77 2e 7d 0a 0a 5c |bol to d|raw.}..\|
|00001cc0| 73 75 62 73 65 63 74 69 | 6f 6e 20 7b 44 72 61 77 |subsecti|on {Draw|
|00001cd0| 69 6e 67 20 4c 69 6e 65 | 73 20 6f 72 20 43 75 72 |ing Line|s or Cur|
|00001ce0| 76 65 73 7d 0a 0a 50 4c | 50 4c 4f 54 20 70 72 6f |ves}..PL|PLOT pro|
|00001cf0| 76 69 64 65 73 20 74 77 | 6f 20 66 75 6e 63 74 69 |vides tw|o functi|
|00001d00| 6f 6e 73 20 66 6f 72 20 | 64 72 61 77 69 6e 67 20 |ons for |drawing |
|00001d10| 6c 69 6e 65 20 67 72 61 | 70 68 73 2e 0a 41 6c 6c |line gra|phs..All|
|00001d20| 20 6c 69 6e 65 73 20 61 | 72 65 20 64 72 61 77 6e | lines a|re drawn|
|00001d30| 20 69 6e 0a 74 68 65 20 | 63 75 72 72 65 6e 74 6c | in.the |currentl|
|00001d40| 79 20 73 65 6c 65 63 74 | 65 64 20 63 6f 6c 6f 72 |y select|ed color|
|00001d50| 2c 20 73 74 79 6c 65 20 | 61 6e 64 20 77 69 64 74 |, style |and widt|
|00001d60| 68 2e 20 53 65 65 20 70 | 61 67 65 20 5c 70 61 67 |h. See p|age \pag|
|00001d70| 65 72 65 66 7b 63 6f 6c | 6f 72 7d 20 69 6e 0a 53 |eref{col|or} in.S|
|00001d80| 65 63 74 69 6f 6e 20 5c | 72 65 66 7b 63 6f 6c 6f |ection \|ref{colo|
|00001d90| 72 7d 2c 20 70 61 67 65 | 20 5c 70 61 67 65 72 65 |r}, page| \pagere|
|00001da0| 66 7b 73 74 79 6c 65 7d | 20 69 6e 20 53 65 63 74 |f{style}| in Sect|
|00001db0| 69 6f 6e 20 5c 72 65 66 | 7b 73 74 79 6c 65 7d 20 |ion \ref|{style} |
|00001dc0| 61 6e 64 0a 70 61 67 65 | 20 5c 70 61 67 65 72 65 |and.page| \pagere|
|00001dd0| 66 7b 77 69 64 74 68 7d | 20 69 6e 20 53 65 63 74 |f{width}| in Sect|
|00001de0| 69 6f 6e 20 5c 72 65 66 | 7b 77 69 64 74 68 7d 20 |ion \ref|{width} |
|00001df0| 66 6f 72 0a 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |for.info|rmation |
|00001e00| 61 62 6f 75 74 20 63 68 | 61 6e 67 69 6e 67 20 74 |about ch|anging t|
|00001e10| 68 65 73 65 20 70 61 72 | 61 6d 65 74 65 72 73 2e |hese par|ameters.|
|00001e20| 0a 0a 7b 5c 74 74 20 70 | 6c 6c 69 6e 65 7d 20 64 |..{\tt p|lline} d|
|00001e30| 72 61 77 73 20 61 20 6c | 69 6e 65 20 6f 72 20 63 |raws a l|ine or c|
|00001e40| 75 72 76 65 2e 20 54 68 | 65 20 63 75 72 76 65 20 |urve. Th|e curve |
|00001e50| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 7b 5c 74 74 |consists| of {\tt|
|00001e60| 20 6e 2d 31 7d 20 6c 69 | 6e 65 0a 73 65 67 6d 65 | n-1} li|ne.segme|
|00001e70| 6e 74 73 20 6a 6f 69 6e | 69 6e 67 20 74 68 65 20 |nts join|ing the |
|00001e80| 7b 5c 74 74 20 6e 7d 20 | 70 6f 69 6e 74 73 20 69 |{\tt n} |points i|
|00001e90| 6e 20 74 68 65 20 69 6e | 70 75 74 20 61 72 72 61 |n the in|put arra|
|00001ea0| 79 73 2e 20 46 6f 72 20 | 73 69 6e 67 6c 65 20 6c |ys. For |single l|
|00001eb0| 69 6e 65 0a 73 65 67 6d | 65 6e 74 73 2c 20 7b 5c |ine.segm|ents, {\|
|00001ec0| 74 74 20 70 6c 6a 6f 69 | 6e 7d 20 69 73 20 75 73 |tt pljoi|n} is us|
|00001ed0| 65 64 20 74 6f 20 6a 6f | 69 6e 20 74 77 6f 20 70 |ed to jo|in two p|
|00001ee0| 6f 69 6e 74 73 2e 0a 0a | 5c 6e 61 6d 65 7b 70 6c |oints...|\name{pl|
|00001ef0| 6c 69 6e 65 28 6e 2c 78 | 2c 79 29 3b 7d 0a 5c 61 |line(n,x|,y);}.\a|
|00001f00| 72 67 75 7b 7b 5c 74 74 | 20 6e 7d 20 28 50 4c 49 |rgu{{\tt| n} (PLI|
|00001f10| 4e 54 2c 20 69 6e 70 75 | 74 29 7d 0a 7b 74 68 65 |NT, inpu|t)}.{the|
|00001f20| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 6f 69 6e 74 | number |of point|
|00001f30| 73 2e 7d 0a 5c 61 72 67 | 75 7b 7b 5c 74 74 20 78 |s.}.\arg|u{{\tt x|
|00001f40| 2c 20 79 7d 20 28 50 4c | 46 4c 54 20 2a 2c 20 69 |, y} (PL|FLT *, i|
|00001f50| 6e 70 75 74 29 7d 0a 7b | 70 6f 69 6e 74 65 72 73 |nput)}.{|pointers|
|00001f60| 20 74 6f 20 61 72 72 61 | 79 73 20 77 69 74 68 20 | to arra|ys with |
|00001f70| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 6f 66 20 74 |coordina|tes of t|
|00001f80| 68 65 20 7b 5c 74 74 20 | 6e 7d 20 70 6f 69 6e 74 |he {\tt |n} point|
|00001f90| 73 2e 7d 0a 0a 5c 6e 61 | 6d 65 7b 70 6c 6a 6f 69 |s.}..\na|me{pljoi|
|00001fa0| 6e 28 78 31 2c 79 31 2c | 78 32 2c 79 32 29 3b 7d |n(x1,y1,|x2,y2);}|
|00001fb0| 0a 5c 61 72 67 75 7b 7b | 5c 74 74 20 78 31 2c 20 |.\argu{{|\tt x1, |
|00001fc0| 79 31 7d 20 28 50 4c 46 | 4c 54 2c 20 69 6e 70 75 |y1} (PLF|LT, inpu|
|00001fd0| 74 29 7d 0a 7b 63 6f 6f | 72 64 69 6e 61 74 65 73 |t)}.{coo|rdinates|
|00001fe0| 20 6f 66 20 74 68 65 20 | 66 69 72 73 74 20 70 6f | of the |first po|
|00001ff0| 69 6e 74 2e 7d 0a 5c 61 | 72 67 75 7b 7b 5c 74 74 |int.}.\a|rgu{{\tt|
|00002000| 20 78 32 2c 20 79 32 7d | 20 28 50 4c 46 4c 54 2c | x2, y2}| (PLFLT,|
|00002010| 20 69 6e 70 75 74 29 7d | 0a 7b 63 6f 6f 72 64 69 | input)}|.{coordi|
|00002020| 6e 61 74 65 73 20 6f 66 | 20 74 68 65 20 73 65 63 |nates of| the sec|
|00002030| 6f 6e 64 20 70 6f 69 6e | 74 2e 7d 0a 0a 5c 73 75 |ond poin|t.}..\su|
|00002040| 62 73 65 63 74 69 6f 6e | 20 7b 57 72 69 74 69 6e |bsection| {Writin|
|00002050| 67 20 54 65 78 74 20 6f | 6e 20 61 20 47 72 61 70 |g Text o|n a Grap|
|00002060| 68 7d 20 5c 6c 61 62 65 | 6c 20 7b 67 72 61 70 68 |h} \labe|l {graph|
|00002070| 2d 74 65 78 74 7d 0a 0a | 7b 5c 74 74 20 70 6c 70 |-text}..|{\tt plp|
|00002080| 74 65 78 7d 20 61 6c 6c | 6f 77 73 20 74 65 78 74 |tex} all|ows text|
|00002090| 20 74 6f 20 62 65 20 77 | 72 69 74 74 65 6e 20 77 | to be w|ritten w|
|000020a0| 69 74 68 69 6e 20 74 68 | 65 20 6c 69 6d 69 74 73 |ithin th|e limits|
|000020b0| 20 73 65 74 20 62 79 0a | 7b 5c 74 74 20 70 6c 65 | set by.|{\tt ple|
|000020c0| 6e 76 7d 2e 20 54 68 65 | 20 72 65 66 65 72 65 6e |nv}. The| referen|
|000020d0| 63 65 20 70 6f 69 6e 74 | 20 6f 66 20 61 20 74 65 |ce point| of a te|
|000020e0| 78 74 20 73 74 72 69 6e | 67 20 6d 61 79 20 62 65 |xt strin|g may be|
|000020f0| 20 6c 6f 63 61 74 65 64 | 0a 61 6e 79 77 68 65 72 | located|.anywher|
|00002100| 65 20 61 6c 6f 6e 67 20 | 61 6e 20 69 6d 61 67 69 |e along |an imagi|
|00002110| 6e 61 72 79 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 |nary hor|izontal |
|00002120| 6c 69 6e 65 20 70 61 73 | 73 69 6e 67 20 74 68 72 |line pas|sing thr|
|00002130| 6f 75 67 68 20 74 68 65 | 20 73 74 72 69 6e 67 0a |ough the| string.|
|00002140| 61 74 20 68 61 6c 66 20 | 74 68 65 20 68 65 69 67 |at half |the heig|
|00002150| 68 74 20 6f 66 20 61 20 | 63 61 70 69 74 61 6c 20 |ht of a |capital |
|00002160| 6c 65 74 74 65 72 2e 20 | 54 68 65 20 70 61 72 61 |letter. |The para|
|00002170| 6d 65 74 65 72 20 22 6a | 75 73 74 22 20 73 70 65 |meter "j|ust" spe|
|00002180| 63 69 66 69 65 73 0a 77 | 68 65 72 65 20 61 6c 6f |cifies.w|here alo|
|00002190| 6e 67 20 74 68 69 73 20 | 6c 69 6e 65 20 74 68 65 |ng this |line the|
|000021a0| 20 72 65 66 65 72 65 6e | 63 65 20 70 6f 69 6e 74 | referen|ce point|
|000021b0| 20 69 73 20 6c 6f 63 61 | 74 65 64 2e 20 54 68 65 | is loca|ted. The|
|000021c0| 20 73 74 72 69 6e 67 20 | 69 73 20 74 68 65 6e 0a | string |is then.|
|000021d0| 72 6f 74 61 74 65 64 20 | 61 62 6f 75 74 20 74 68 |rotated |about th|
|000021e0| 65 20 72 65 66 65 72 65 | 6e 63 65 20 70 6f 69 6e |e refere|nce poin|
|000021f0| 74 20 74 68 72 6f 75 67 | 68 20 61 6e 20 61 6e 67 |t throug|h an ang|
|00002200| 6c 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |le speci|fied by |
|00002210| 74 68 65 0a 70 61 72 61 | 6d 65 74 65 72 73 20 7b |the.para|meters {|
|00002220| 5c 74 74 20 64 78 7d 20 | 61 6e 64 20 7b 5c 74 74 |\tt dx} |and {\tt|
|00002230| 20 64 79 7d 2c 20 73 6f | 20 74 68 61 74 20 74 68 | dy}, so| that th|
|00002240| 65 20 73 74 72 69 6e 67 | 20 62 65 63 6f 6d 65 73 |e string| becomes|
|00002250| 20 70 61 72 61 6c 6c 65 | 6c 0a 74 6f 20 61 20 6c | paralle|l.to a l|
|00002260| 69 6e 65 20 6a 6f 69 6e | 69 6e 67 20 7b 5c 74 74 |ine join|ing {\tt|
|00002270| 20 28 78 2c 79 29 7d 20 | 74 6f 20 7b 5c 74 74 20 | (x,y)} |to {\tt |
|00002280| 28 78 2b 64 78 2c 79 2b | 64 79 29 7d 2e 0a 0a 5c |(x+dx,y+|dy)}...\|
|00002290| 6e 61 6d 65 7b 70 6c 70 | 74 65 78 28 78 2c 79 2c |name{plp|tex(x,y,|
|000022a0| 64 78 2c 64 79 2c 6a 75 | 73 74 2c 74 65 78 74 29 |dx,dy,ju|st,text)|
|000022b0| 3b 7d 0a 5c 61 72 67 75 | 7b 7b 5c 74 74 20 78 2c |;}.\argu|{{\tt x,|
|000022c0| 20 79 7d 20 28 50 4c 46 | 4c 54 2c 20 69 6e 70 75 | y} (PLF|LT, inpu|
|000022d0| 74 29 7d 0a 7b 63 6f 6f | 72 64 69 6e 61 74 65 73 |t)}.{coo|rdinates|
|000022e0| 20 6f 66 20 74 68 65 20 | 72 65 66 65 72 65 6e 63 | of the |referenc|
|000022f0| 65 20 70 6f 69 6e 74 2e | 7d 0a 5c 61 72 67 75 7b |e point.|}.\argu{|
|00002300| 7b 5c 74 74 20 64 78 2c | 20 64 79 7d 20 28 50 4c |{\tt dx,| dy} (PL|
|00002310| 46 4c 54 2c 20 69 6e 70 | 75 74 29 7d 0a 7b 74 68 |FLT, inp|ut)}.{th|
|00002320| 65 73 65 20 73 70 65 63 | 69 66 79 20 74 68 65 20 |ese spec|ify the |
|00002330| 61 6e 67 6c 65 20 61 74 | 20 77 68 69 63 68 20 74 |angle at| which t|
|00002340| 68 65 20 74 65 78 74 20 | 69 73 20 74 6f 20 62 65 |he text |is to be|
|00002350| 20 70 72 69 6e 74 65 64 | 2e 20 54 68 65 20 74 65 | printed|. The te|
|00002360| 78 74 20 69 73 0a 20 77 | 72 69 74 74 65 6e 20 70 |xt is. w|ritten p|
|00002370| 61 72 61 6c 6c 65 6c 20 | 74 6f 20 61 20 6c 69 6e |arallel |to a lin|
|00002380| 65 20 6a 6f 69 6e 69 6e | 67 20 74 68 65 20 70 6f |e joinin|g the po|
|00002390| 69 6e 74 73 20 7b 5c 74 | 74 20 28 78 2c 79 29 7d |ints {\t|t (x,y)}|
|000023a0| 20 74 6f 0a 20 7b 5c 74 | 74 20 28 78 2b 64 78 2c | to. {\t|t (x+dx,|
|000023b0| 79 2b 64 79 29 7d 20 6f | 6e 20 74 68 65 20 67 72 |y+dy)} o|n the gr|
|000023c0| 61 70 68 2e 7d 0a 5c 61 | 72 67 75 7b 7b 5c 74 74 |aph.}.\a|rgu{{\tt|
|000023d0| 20 6a 75 73 74 7d 20 28 | 50 4c 46 4c 54 2c 20 69 | just} (|PLFLT, i|
|000023e0| 6e 70 75 74 29 7d 0a 7b | 64 65 74 65 72 6d 69 6e |nput)}.{|determin|
|000023f0| 65 73 20 6a 75 73 74 69 | 66 69 63 61 74 69 6f 6e |es justi|fication|
|00002400| 20 6f 66 20 74 68 65 20 | 73 74 72 69 6e 67 20 62 | of the |string b|
|00002410| 79 20 73 70 65 63 69 66 | 79 69 6e 67 20 77 68 69 |y specif|ying whi|
|00002420| 63 68 20 70 6f 69 6e 74 | 20 77 69 74 68 69 6e 0a |ch point| within.|
|00002430| 20 74 68 65 20 73 74 72 | 69 6e 67 20 69 73 20 70 | the str|ing is p|
|00002440| 6c 61 63 65 64 20 61 74 | 20 74 68 65 20 72 65 66 |laced at| the ref|
|00002450| 65 72 65 6e 63 65 20 70 | 6f 69 6e 74 20 7b 5c 74 |erence p|oint {\t|
|00002460| 74 20 28 78 2c 79 29 7d | 2e 20 54 68 69 73 20 70 |t (x,y)}|. This p|
|00002470| 61 72 61 6d 65 74 65 72 | 0a 20 69 73 20 61 20 66 |arameter|. is a f|
|00002480| 72 61 63 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 64 |raction |of the d|
|00002490| 69 73 74 61 6e 63 65 20 | 61 6c 6f 6e 67 20 74 68 |istance |along th|
|000024a0| 65 20 73 74 72 69 6e 67 | 2e 20 54 68 75 73 20 69 |e string|. Thus i|
|000024b0| 66 20 7b 5c 74 74 20 6a | 75 73 74 3d 30 2e 30 7d |f {\tt j|ust=0.0}|
|000024c0| 2c 0a 20 74 68 65 20 72 | 65 66 65 72 65 6e 63 65 |,. the r|eference|
|000024d0| 20 70 6f 69 6e 74 20 69 | 73 20 61 74 20 74 68 65 | point i|s at the|
|000024e0| 20 6c 65 66 74 2d 68 61 | 6e 64 20 65 64 67 65 20 | left-ha|nd edge |
|000024f0| 6f 66 20 74 68 65 20 73 | 74 72 69 6e 67 2e 0a 20 |of the s|tring.. |
|00002500| 49 66 20 7b 5c 74 74 20 | 6a 75 73 74 3d 30 2e 35 |If {\tt |just=0.5|
|00002510| 7d 2c 20 69 74 20 69 73 | 20 61 74 20 74 68 65 20 |}, it is| at the |
|00002520| 63 65 6e 74 65 72 20 61 | 6e 64 20 69 66 20 7b 5c |center a|nd if {\|
|00002530| 74 74 20 6a 75 73 74 3d | 31 2e 30 7d 2c 20 69 74 |tt just=|1.0}, it|
|00002540| 20 69 73 20 61 74 0a 20 | 74 68 65 20 72 69 67 68 | is at. |the righ|
|00002550| 74 2d 68 61 6e 64 20 65 | 64 67 65 2e 7d 0a 5c 61 |t-hand e|dge.}.\a|
|00002560| 72 67 75 7b 7b 5c 74 74 | 20 74 65 78 74 7d 20 28 |rgu{{\tt| text} (|
|00002570| 63 68 61 72 20 2a 2c 20 | 69 6e 70 75 74 29 7d 0a |char *, |input)}.|
|00002580| 7b 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 |{pointer| to the |
|00002590| 73 74 72 69 6e 67 20 6f | 66 20 63 68 61 72 61 63 |string o|f charac|
|000025a0| 74 65 72 73 20 74 6f 20 | 62 65 20 77 72 69 74 74 |ters to |be writt|
|000025b0| 65 6e 2e 7d 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |en.}..\s|ubsectio|
|000025c0| 6e 20 7b 41 72 65 61 20 | 46 69 6c 6c 73 7d 0a 0a |n {Area |Fills}..|
|000025d0| 41 72 65 61 20 66 69 6c | 6c 73 20 61 72 65 20 64 |Area fil|ls are d|
|000025e0| 6f 6e 65 20 69 6e 0a 74 | 68 65 20 63 75 72 72 65 |one in.t|he curre|
|000025f0| 6e 74 6c 79 20 73 65 6c | 65 63 74 65 64 20 63 6f |ntly sel|ected co|
|00002600| 6c 6f 72 2c 20 6c 69 6e | 65 20 73 74 79 6c 65 2c |lor, lin|e style,|
|00002610| 20 6c 69 6e 65 20 77 69 | 64 74 68 20 61 6e 64 20 | line wi|dth and |
|00002620| 70 61 74 74 65 72 6e 20 | 73 74 79 6c 65 2e 0a 0a |pattern |style...|
|00002630| 7b 5c 74 74 20 70 6c 66 | 69 6c 6c 7d 20 66 69 6c |{\tt plf|ill} fil|
|00002640| 6c 73 20 61 20 70 6f 6c | 79 67 6f 6e 2e 20 54 68 |ls a pol|ygon. Th|
|00002650| 65 20 70 6f 6c 79 67 6f | 6e 20 63 6f 6e 73 69 73 |e polygo|n consis|
|00002660| 74 73 20 6f 66 20 7b 5c | 74 74 20 6e 7d 0a 76 65 |ts of {\|tt n}.ve|
|00002670| 72 74 69 63 65 73 20 77 | 68 69 63 68 20 64 65 66 |rtices w|hich def|
|00002680| 69 6e 65 20 74 68 65 20 | 70 6f 6c 79 67 6f 6e 2e |ine the |polygon.|
|00002690| 0a 0a 5c 6e 61 6d 65 7b | 70 6c 66 69 6c 6c 28 6e |..\name{|plfill(n|
|000026a0| 2c 78 2c 79 29 3b 7d 0a | 5c 61 72 67 75 7b 7b 5c |,x,y);}.|\argu{{\|
|000026b0| 74 74 20 6e 7d 20 28 50 | 4c 49 4e 54 2c 20 69 6e |tt n} (P|LINT, in|
|000026c0| 70 75 74 29 7d 0a 7b 74 | 68 65 20 6e 75 6d 62 65 |put)}.{t|he numbe|
|000026d0| 72 20 6f 66 20 76 65 72 | 74 69 63 65 73 2e 7d 0a |r of ver|tices.}.|
|000026e0| 5c 61 72 67 75 7b 7b 5c | 74 74 20 78 2c 20 79 7d |\argu{{\|tt x, y}|
|000026f0| 20 28 50 4c 46 4c 54 20 | 2a 2c 20 69 6e 70 75 74 | (PLFLT |*, input|
|00002700| 29 7d 0a 7b 70 6f 69 6e | 74 65 72 73 20 74 6f 20 |)}.{poin|ters to |
|00002710| 61 72 72 61 79 73 20 77 | 69 74 68 20 63 6f 6f 72 |arrays w|ith coor|
|00002720| 64 69 6e 61 74 65 73 20 | 6f 66 20 74 68 65 20 7b |dinates |of the {|
|00002730| 5c 74 74 20 6e 7d 20 76 | 65 72 74 69 63 65 73 2e |\tt n} v|ertices.|
|00002740| 7d 0a 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 20 |}...\sub|section |
|00002750| 7b 4d 6f 72 65 20 43 6f | 6d 70 6c 65 78 20 47 72 |{More Co|mplex Gr|
|00002760| 61 70 68 73 20 28 48 69 | 73 74 6f 67 72 61 6d 73 |aphs (Hi|stograms|
|00002770| 20 61 6e 64 20 45 72 72 | 6f 72 20 42 61 72 73 29 | and Err|or Bars)|
|00002780| 7d 0a 0a 46 75 6e 63 74 | 69 6f 6e 73 20 5c 72 6f |}..Funct|ions \ro|
|00002790| 75 7b 70 6c 62 69 6e 7d | 20 61 6e 64 20 5c 72 6f |u{plbin}| and \ro|
|000027a0| 75 7b 70 6c 68 69 73 74 | 7d 20 61 72 65 20 70 72 |u{plhist|} are pr|
|000027b0| 6f 76 69 64 65 64 20 66 | 6f 72 0a 64 72 61 77 69 |ovided f|or.drawi|
|000027c0| 6e 67 20 68 69 73 74 6f | 67 72 61 6d 73 2c 20 61 |ng histo|grams, a|
|000027d0| 6e 64 20 66 75 6e 63 74 | 69 6f 6e 73 20 5c 72 6f |nd funct|ions \ro|
|000027e0| 75 7b 70 6c 65 72 72 78 | 7d 0a 61 6e 64 20 5c 72 |u{plerrx|}.and \r|
|000027f0| 6f 75 7b 70 6c 65 72 72 | 79 7d 20 64 72 61 77 20 |ou{plerr|y} draw |
|00002800| 65 72 72 6f 72 20 62 61 | 72 73 20 61 62 6f 75 74 |error ba|rs about|
|00002810| 20 73 70 65 63 69 66 69 | 65 64 0a 70 6f 69 6e 74 | specifi|ed.point|
|00002820| 73 2e 20 54 68 65 79 20 | 61 72 65 20 64 65 73 63 |s. They |are desc|
|00002830| 72 69 62 65 64 20 69 6e | 20 64 65 74 61 69 6c 20 |ribed in| detail |
|00002840| 69 6e 20 43 68 61 70 74 | 65 72 20 5c 72 65 66 7b |in Chapt|er \ref{|
|00002850| 72 65 66 65 72 65 6e 63 | 65 7d 2e 0a 0a 5c 73 65 |referenc|e}...\se|
|00002860| 63 74 69 6f 6e 20 7b 46 | 69 6e 69 73 68 69 6e 67 |ction {F|inishing|
|00002870| 20 55 70 7d 0a 0a 42 65 | 66 6f 72 65 20 74 68 65 | Up}..Be|fore the|
|00002880| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 70 72 6f 67 | end of |the prog|
|00002890| 72 61 6d 2c 20 41 4c 57 | 41 59 53 20 63 61 6c 6c |ram, ALW|AYS call|
|000028a0| 20 5c 72 6f 75 7b 70 6c | 65 6e 64 7d 0a 74 6f 20 | \rou{pl|end}.to |
|000028b0| 63 6c 6f 73 65 20 61 6e | 79 20 6f 75 74 70 75 74 |close an|y output|
|000028c0| 20 70 6c 6f 74 20 66 69 | 6c 65 73 20 61 6e 64 20 | plot fi|les and |
|000028d0| 74 6f 20 66 72 65 65 20 | 75 70 20 72 65 73 6f 75 |to free |up resou|
|000028e0| 72 63 65 73 2e 0a 46 6f | 72 20 64 65 76 69 63 65 |rces..Fo|r device|
|000028f0| 73 20 74 68 61 74 20 68 | 61 76 65 20 73 65 70 61 |s that h|ave sepa|
|00002900| 72 61 74 65 20 67 72 61 | 70 68 69 63 73 0a 61 6e |rate gra|phics.an|
|00002910| 64 20 74 65 78 74 20 6d | 6f 64 65 73 2c 20 7b 5c |d text m|odes, {\|
|00002920| 74 74 20 70 6c 65 6e 64 | 7d 20 72 65 73 65 74 73 |tt plend|} resets|
|00002930| 20 74 68 65 20 64 65 76 | 69 63 65 20 74 6f 20 74 | the dev|ice to t|
|00002940| 65 78 74 20 6d 6f 64 65 | 2e 0a 0a 5c 73 65 63 74 |ext mode|...\sect|
|00002950| 69 6f 6e 20 7b 49 6e 20 | 43 61 73 65 20 6f 66 20 |ion {In |Case of |
|00002960| 45 72 72 6f 72 7d 0a 0a | 49 66 20 61 20 66 61 74 |Error}..|If a fat|
|00002970| 61 6c 20 65 72 72 6f 72 | 20 69 73 20 65 6e 63 6f |al error| is enco|
|00002980| 75 6e 74 65 72 65 64 20 | 64 75 72 69 6e 67 20 65 |untered |during e|
|00002990| 78 65 63 75 74 69 6f 6e | 20 6f 66 20 61 20 50 4c |xecution| of a PL|
|000029a0| 50 4c 4f 54 20 72 6f 75 | 74 69 6e 65 0a 74 68 65 |PLOT rou|tine.the|
|000029b0| 6e 20 5c 72 6f 75 7b 70 | 6c 65 78 69 74 7d 20 69 |n \rou{p|lexit} i|
|000029c0| 73 20 63 61 6c 6c 65 64 | 2e 20 54 68 69 73 20 72 |s called|. This r|
|000029d0| 6f 75 74 69 6e 65 20 70 | 72 69 6e 74 73 20 61 6e |outine p|rints an|
|000029e0| 20 65 72 72 6f 72 20 6d | 65 73 73 61 67 65 2c 0a | error m|essage,.|
|000029f0| 64 6f 65 73 20 72 65 73 | 6f 75 72 63 65 20 72 65 |does res|ource re|
|00002a00| 63 6f 76 65 72 79 2c 20 | 63 61 6c 6c 73 20 7b 5c |covery, |calls {\|
|00002a10| 74 74 20 70 6c 5c 5f 65 | 78 69 74 7d 20 28 70 61 |tt pl\_e|xit} (pa|
|00002a20| 67 65 7e 5c 70 61 67 65 | 72 65 66 7b 70 6c 78 65 |ge~\page|ref{plxe|
|00002a30| 78 69 74 7d 29 20 0a 61 | 6e 64 20 74 68 65 6e 20 |xit}) .a|nd then |
|00002a40| 65 78 69 74 73 2e 20 54 | 68 65 0a 64 65 66 61 75 |exits. T|he.defau|
|00002a50| 6c 74 20 7b 5c 74 74 20 | 70 6c 5c 5f 65 78 69 74 |lt {\tt |pl\_exit|
|00002a60| 7d 20 72 6f 75 74 69 6e | 65 20 64 6f 65 73 20 6e |} routin|e does n|
|00002a70| 6f 74 68 69 6e 67 2c 20 | 62 75 74 20 74 68 65 20 |othing, |but the |
|00002a80| 75 73 65 72 20 6d 61 79 | 20 77 69 73 68 0a 74 6f |user may| wish.to|
|00002a90| 20 73 75 70 70 6c 79 20 | 68 69 73 2f 68 65 72 20 | supply |his/her |
|00002aa0| 6f 77 6e 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 7b |own vers|ion of {|
|00002ab0| 5c 74 74 20 70 6c 5c 5f | 65 78 69 74 7d 2e 0a 0a |\tt pl\_|exit}...|
+--------+-------------------------+-------------------------+--------+--------+