÷ƒ’À;è TeX output 1993.10.04:1604‹ÿÿÿÿ ž¿°� ýT@P��’¾¯þóKñ`y cmr10Ä1ŽŽ �¿°� ý•@P��‘Gó7ò"Vff cmbx10â1Ž‘*èFIn�Š=tro�uÂductionŽŸç�‘GÄMetaPš¸ãost–|Ÿis“a“batc˜h-orien˜ted“graphics“language“based“on“Kn˜uth's“óIÈØ 0 logo10ëIMET�ÇAF�Ž9ONT��Ÿü^ÿóÙ“ Rcmr7³1ŽŽ‘|sÄ,“but“with“P˜ostScript��Ÿü^ÿ³2ŽŽŽ¤ �‘GÄoutput–M and“nš¸ãumerous“features“for“in˜tegrating“text“and“graphics.‘oThe“author“has“tried“to“mak˜e“thisŽ¡�‘GpapšGer–)+as“indep˜enden�¸ãt“as“p˜ossible“of“the“user's“man�¸ãual“[�5Ž‘],‘^!but“fully“appreciating“all“the“materialŽ¡�‘Grequires–UUsome“knoš¸ãwledge“of“the“MetaP˜ost“language.Ž©�‘!GW‘ÿ*ªe–ŸWconcenš¸ãtrate“on“the“mec˜hanics“of“prošGducing“particular“kinds“of“graphs“b˜ecause“the“questionŽ¡�‘Gof–{÷what“t�¸ãypšGe“of“graph“is“b˜est“in“a“givš¸ãen“situation“is“co˜v˜ered“elsewhere;‘�He.g.,‘…ŸClev˜eland“[�2Ž‘,�“4Ž›{ø,�“3Ž˜]“andŽ¡�‘GT‘ÿ*ªufte–ÎÞ[�11Ž‘ ].‘ÞcThe“goal“is“to“proš¸ãvide“at“least“the“p�Go˜w˜er“of“UNIX��Ÿü^ÿ³3ŽŽ‘K2óý': cmti10Çgr‘ÿ}'ap‘pvÄ[�1Ž‘],‘í@but“within“the“MetaP˜ostŽ¡�‘Glanguage.‘qÇHence–UUthe“pacš¸ãk‘ÿqÇage“is“implemen˜ted“using“MetaP˜ost's“p�Go˜w˜erful“macro“facilit˜y‘ÿ*ª.ަ�‘!GThe–UUgraph“macros“proš¸ãvide“the“follo˜wing“functionalit˜y:Ž©����‘J)1.ŽŽŽ‘+GAutomatic‘UUscalingޤ����‘J)2.ŽŽŽ‘+GAutomatic–UUgeneration“and“lab�Geling“of“tic�¸ãk“marks“or“grid“linesŽ¡����‘J)3.ŽŽŽ‘+GMultiple–UUco�Gordinate“systemsŽ¡����‘J)4.ŽŽŽ‘+GLinear–UUand“logarithmic“scalesŽ¡����‘J)5.ŽŽŽ‘+GSeparate–UUdata“ lesŽ¡����‘J)6.ŽŽŽ‘+GAbilitš¸ãy–UUto“handle“n˜um˜b�Gers“outside“the“usual“rangeŽ¡����‘J)7.ŽŽŽ‘+GArbitrary–UUplotting“sym�¸ãb�GolsŽ¡����‘J)8.ŽŽŽ‘+GDra�¸ãwing,–UU lling,“and“lab�Geling“commands“for“graphsަ�‘GIn–Éaddition“to“these“items,‘>fthe“user“also“has“access“to“all“the“features“describ�Ged“in“the“MetaP�¸ãostޤ �‘Guser's–ADmanš¸ãual“[�5Ž‘].‘kThese“include“access“to“almost“all“the“features“of“P˜ostScript��Ÿû±È���‘�þž²×ó†›Zcmr5«RŽŽŽ���ó O!â…cmsy7µ ŽŽŽŽŽ‘øåÄ,‘EGabilit˜y“to“use“andŽ¡�‘Gmanipulate–¿¹tš¸ãyp�Geset“text,‘Ý¥abilit˜y“to“solv˜e“linear“equations,‘Ý¥and“data“t˜ypšGes“for“p˜oin•¸ãts,›Ý¥curv“es,˜pictures,Ž¡�‘Gand–UUco�Gordinate“transformations.ŽŸ�‘!GSection–äÐ2“describšGes“the“graph“macros“from“a“user's“p˜ersp˜ectivš¸ãe“and“presen˜ts“sev˜eral“examples.Ž¡�‘GSections–ñj3“and“4“discuss“auxiliary“pacš¸ãk‘ÿqÇages“for“manipulating“and“t˜yp�Gesetting“n˜um˜b�Gers“and“Section“5Ž¡�‘Ggivš¸ães–M¹some“concluding“remarks.‘éApp�Gendix“A“summarizes“the“graph-dra˜wing“macros,‘‚rand“App�Gendix“BŽ¡�‘Gdescrib�Ges–UUsome“recenš¸ãt“additions“to“the“MetaP˜ost“language“that“ha˜v˜e“not“b�Geen“presen˜ted“elsewhere.ŽŸ'Ä��‘Gâ2Ž‘*èFUsing–…the“Graph“MacrosŽŸç�‘GÄA–UUMetaP�¸ãost“input“ le“that“uses“the“graph“macros“should“b�Gegin“withޤ��’δóßê���‘ "5Ÿý-:¯2ŽŽ‘LܸP�ÃŽostScript–ÕXis“a“registered“trademark“of“Adob� cmmi10Å:Ž�‘füþÆh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ�’ž @Ê(�Æh�Ästring–UUor“picture“expressionŽ‘wqÔÆiŽ‘8òÊ,�‘?ýÆh�Älo�GcationŽ‘"¸êÆiŽ‘/ÀÊ)Ž�’`ƒÆh�Äoption‘UUlistŽ‘,€ÆiŽŽ¡�‘GÄwhere–½KÆhÄlošGcationÆi“Äiden�¸ãti es“the“lo˜cation“b˜eing“lab˜eled“and“ÆhÄlab˜el“suxÆi“Ätells“ho�¸ãw“the“lab˜el“is“o setަ�‘Grelativš¸ãe–»nto“that“lo�Gcation.‘¤The“Êgdotlabel“Äcommand“is“iden˜tical,‘Ôôexcept“it“marks“the“lo�Gcation“withަ�‘Ga–™Ädot.‘?A‘™²ÆhÄlab�Gel“suxÆi“Äis“as“in“plain“MetaP•¸ãost:‘ú¥ÆhÄempt“yÆi›™ÄÄcen“ters˜the˜lab•Gel˜on˜the˜lo“cation;‘»üÊlftÄ,‘ªàÊrtÄ,ަ�‘GÊtopÄ,‘Ì‘Êbot–´¸Äo set“the“lab�Gel“horizonš¸ãtally“or“v˜ertically;‘äjand“ÊulftÄ,–Ì‘ÊurtÄ,“ÊllftÄ,“Êlrt–´¸Ägiv˜e“diagonal“o sets.ަ�‘GThe–íªÆhÄlošGcationÆi“Äcan“b˜e“a“pair“of“graph“co˜ordinates,‘¿a“knot“n•¸ãum“b˜er–íªon“the“last“Êgdraw“Äpath,‘¿or“theަ�‘Gsp•Gecial›UUlo“cation˜ÊOUTÄ.˜Th�¸ãusŽ¡��’„€ÞÊgdotlabel.top(btex–?ý$(50,0)$“etex,“50,0)ŽŽ¡�‘GÄwš¸ãould–œ+put“a“dot“at“graph“co�Gordinates“Ê(50,0)“Äand“place“the“t˜ypšGeset“text“\(50Å;‘ª¨Ä0)"“ab˜o•¸ãv“e‘œ+it.‘FIAlter-ަ�‘Gnativ�¸ãely‘ÿ*ª,ަ��’®€ÆÊglabel.ulft("Knot3",‘?ý3)ŽŽ¤�‘GÄt�¸ãypšGesets–àNthe“string“Ê"Knot3"“Äand“places“it“ab˜o•¸ãv“e–àNand“to“the“left“of“Knot“3“of“the“last“Êgdraw“Äpath.ަ�‘G(The–UUknot“n•¸ãum“b�Ger–UU3“the“path's“\time"“parameter“[�5Ž‘,“Section“8.2].)Ž¡�‘!GThe– öÆhÄlošGcationÆi“ÊOUT‘ ÇÄplaces“a“lab˜el“relativ�¸ãe“to“the“whole“graph.‘•ªF‘ÿ*ªor“example,‘9žreplacing“\Êgdrawަ�‘G"agepop91.d"Ä"‘UUwithŽŸ N:��ŸóÜq��‘0�Êglabel.lft(btex–?ý\vbox{\hbox{Population}“\hbox{in“millions}}“etex,“OUT);ŽŽ¦��‘0�glabel.bot(btex–?ýAge“in“years“etex,“OUT);ŽŽ¦��‘0�gdraw‘?ý"agepopm.d";ŽŽŽŽŸ �‘GÄin– –the“input“for“Figure“1“generates“Figure“3.‘‘‹This“impro•¸ãv“es– –the“graph“b�¸ãy“adding“axis“lab�Gels“andަ�‘Gusing–´•a“new“data“ le“Êagepopm.d“Äwhere“the“pšGopulations“ha•¸ãv“e–´•b˜een“divided“bš¸ãy“one“million“to“a˜v˜oidŽŽŸŽŒ‹) ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ4ŽŽ �¿°� þ\Üq� ÿ.cß ³ªZ���‘Z×Nï9PSfile=mpgraph.3 llx=-68 lly=-31 urx=219 ury=147 rwi=2870ŽŽŽŸ��‘[YtFigure–UU3:‘qÇAn“impro•¸ãv“ed›UUv“ersion˜of˜the˜1991˜age˜distribution˜graphŽŽŽŸ&W�‘Glarge›Jn•¸ãum“b�Gers.‘nW‘ÿ*ªe˜shall˜see˜later˜that˜simple˜transformations˜suc“h˜as˜this˜can˜b�Ge˜ac“hiev“ed˜withoutޤ �‘Ggenerating–UUnew“data“ les.Ž©“+�‘!GAll›0k a•¸ãv“ors˜of˜T�‘þU>Ÿ'EŽ‘ãxX˜can˜handle˜m“ulti-line˜lab�Gels˜via˜the˜Ê\hbox˜Äwithin˜Ê\vbox˜Äarrangemen“t˜usedŽ¡�‘Gab�Go•¸ãv“e,‘ÿ`but–Ý^L�‘üffŸþµUóLŒ-ø cmcsc10ëLaŽ‘‹ÄT�‘þU>ŸŒEŽ‘ãxX“users“will“ nd“it“more“natural“to“use“the“Êtabular“Äen•¸ãvironmen“t–Ý^[�9Ž‘].‘ áT‘ÿ*ªro “user'sŽ¡�‘Gcan–UUuse“no ll“mo�Gde:ŽŸŽ9��ŸôŽ9��’Àà»Êbtex‘?ý.nfŽŽ¡��’Àà»PopulationŽŽ¡��’Àà»in–?ýmillions“etexŽŽŽŽŸ'×Û��‘GÛ2.2Ž‘0ÑGCo�`ordinate‘€SystemsŽŸ�‘GÄThe–v&graph“macros“automatically“shift“and“rescale“co�Gordinates“from“data“ les,›¾ZÊgdraw“Äpaths,˜andŽ¡�‘GÊglabel–©4ÄlošGcations“to“ t“the“graph.‘mdWhether“the“range“of“Åy‘ Äco˜ordinates“is“0.64“to“4.6“or“640,000“toŽ¡�‘G4,600,000,‘"Sthey–’get“scaled“to“ ll“abšGout“88%“of“the“heigh�¸ãt“sp˜eci ed“in“the“Êbegingraph“Ästatemen�¸ãt.‘\†OfŽ¡�‘Gcourse–UUline“widths,“labšGels,“and“plotting“sym�¸ãb˜ols“are“not“rescaled.ަ�‘!GThe–€ÆÊsetrange“Äcommand“conš¸ãtrols“the“shifting“and“rescaling“pro�Gcess“b˜y“sp�Gecifying“the“minim˜umŽ¡�‘Gand–UUmaxim�¸ãum“graph“co�Gordinates:ޤoí��’“‹UÊsetrange(�Æh�Äco�GordinatesŽ‘1Î@ÆiŽ‘9•^Ê,�‘ÀÆh�Äco�GordinatesŽ‘1Î@ÆiŽ‘;U`Ê)ŽŽ¡�‘GÄwhereŽŸ¹‚�����‘V²`Æh�Äco�GordinatesŽ‘1Î@ÆiŽ’“Ö!�‘Çh�Äpair‘UUexpressionŽ‘AqÏÆiŽŽŽŸ ��‘myzj�‘Çh�Än�¸ãumeric–UUor“string“expressionŽ‘{œÆiŽ�’†*µÊ,Ž�’‹j²Æh�Än�¸ãumeric–UUor“string“expressionŽ‘{œÆiŽŽŽŽŽŸ!¹‚�‘GÄThe–¡ø rst“ÆhÄco�GordinatesÆi“Ägivš¸ãe“(Åx�Ÿÿ³minŽ– ÀÅ;‘ª¨y�Ÿÿ³minŽ“Ä)–¡øand“the“second“giv˜e“(Åx�Ÿÿ³maxŽ–AÌÅ;‘ª¨y�Ÿÿ³maxŽ“Ä).‘W¯The–¡ølines“Åx–ñzÄ=“Åx�Ÿÿ³minŽ‘ ÀÄ,ޤ �‘GÅx–‘Ä=“Åx�Ÿÿ³maxŽ‘AÌÄ,›ìÏÅy‘ìéÄ=“Åy�Ÿÿ³minŽ‘ ÀÄ,˜and›΄Åy‘ìéÄ=“Åy�Ÿÿ³maxŽ‘PÄde ne˜the˜rectangular˜frame˜around˜the˜graph˜in˜Figures˜1{3.Ž¡�‘GF‘ÿ*ªor–UUexample,“an“adding“a“statemen�¸ãtޤoí��’Ž ×Êsetrange(origin,‘?ýwhatever,‘Àwhatever)ŽŽ¡�‘GÄto–˶the“input“for“Figure“3“yields“Figure“4.‘ÔêThe“ rst“ÆhÄco�GordinatesÆi“Äare“givš¸ãen“b˜y“the“prede ned“pairޤ �‘Gconstan�¸ãt–&îÊoriginÄ,‘06and“the“other“cošGordinates“are“left“unsp˜eci ed.‘bPAnš¸ãy“unkno˜wn“v‘ÿqÇalue“w˜ould“w˜ork“asŽ¡�‘Gwš¸ãell,–UUbut“Êwhatever“Äis“the“standard“MetaP˜ost“represen˜tation“for“an“anon˜ymous“unkno˜wn“v‘ÿqÇalue.Ž‘GŸëX‰ff­rŸ J=���‘ "5Ÿý-:¯5ŽŽ‘LܸT‘ÿJªro –ÕXusers“should“replace“ëKbtex–@$\bullet$“etex–ÕX¸with“ëKbtex–@\(bu“etex¸.ŽŽŸŽŒ‹"* ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ5ŽŽ �¿°� þ Å§� þêz© �Ïy���Ÿ•EÝ�ŸáÜq��‘-áÊdraw‘?ýbegingraph(3in,2in);ŽŽ¤ ��‘3! glabel.lft(btex–?ý\vbox{\hbox{Population}“\hbox{in“millions}}“etex,“OUT);ŽŽ¡��‘3! glabel.bot(btex–?ýAge“in“years“etex,“OUT);ŽŽ¡��‘3! setrange(origin,‘?ýwhatever,whatever);ŽŽ¡��‘3! gdraw‘?ý"agepopm.d";ŽŽ¡��‘3! endgraph;ŽŽŽ ÕŒs���‘Z×Nï9PSfile=mpgraph.4 llx=-68 lly=-31 urx=219 ury=147 rwi=2870ŽŽŽŽŽŽ ‚Ä��‘LǬÄFigure–UU4:‘qÇThe“1991“age“distribution“graph“and“the“input“that“creates“it.ŽŽŽŸ�‘!GNotice–±xthat“the“synš¸ãtax“for“Êsetrange“Äallo˜ws“cošGordinate“v‘ÿqÇalues“to“b˜e“givš¸ãen“as“strings.‘†1Man˜yޤ �‘Gcommands–íèin“the“graph“pacš¸ãk‘ÿqÇage“allo˜w“this“option.‘;€It“is“pro˜vided“b�Gecause“the“MetaP˜ost“languageŽ¡�‘Guses–û2 xed“p�Goinš¸ãt“n˜um˜b�Gers“that“m˜ust“b�Ge“less“than“32768.‘S¼This“limitation“is“not“as“serious“as“it“soundsŽ¡�‘Gb•Gecause›MIgo“o“d˜graph˜design˜dictates˜that˜co“ordinate˜v‘ÿqÇalues˜should˜b“e˜\of˜reasonable˜magnitude"˜[�2Ž‘,Ž¡��‘G11Ž‘I].‘qÇIf–UUyš¸ãou“really“w˜an˜t“Åx“Äand“Åy‘±.Äto“range“from“0“to“1,000,000,ޤ��’�àÎÊsetrange(origin,‘?ý"1e6",‘À"1e6")ŽŽ¡�‘GÄdošGes–0µthe“job.‘çAn�¸ãy“ xed“or“ oating“p˜oinš¸ãt“represen˜tation“is“acceptable“as“long“as“the“exp�Gonen˜t“isޤ �‘Gin•¸ãtro�Gduced›UUb“y˜the˜letter˜\ÊeÄ".Ž©�‘!GCošGordinate–mêsystems“need“not“b˜e“linear.‘»‡The“Êsetcoords“Äcommand“allo�¸ãws“either“or“b˜oth“axes“toŽ¡�‘Gha•¸ãv“e–UUlogarithmic“spacing:ŽŸ�����‘Kd7Æh�Äco�Gordinate‘UUsettingŽ‘N±ÒÆiŽ’¤¤?!‘ÇÊsetcoords�(Ž�‘?ýÆh�Äco•Gordinate‘UUt�¸ãyp“eŽ‘D\|ÆiŽ�‘Qc—Ê,Ž�‘XN<Æh�Äco•Gordinate‘UUt�¸ãyp“eŽ‘D\|ÆiŽ�’¤qÖÊ)ŽŽŽ¡���‘Kd7Æh�Äco•Gordinate‘UUt�¸ãyp“eŽ‘D\|ÆiŽ’šNé!–ÇÊlog“Æj“Êlinear“Æj�“Ê-Ž›log“Æj�“Ê-Ž˜linearŽŽŽŽŸ&�‘GÄA‘zúnegativš¸ãe–{1ÆhÄco�Gordinate“t˜yp�GeÆi“Ämak˜es“Åx“Ä(or“Åy�[ÙÄ)“run“bac˜kw˜ards“so“it“is“largest“on“the“left“side“(or“b�Gottom)Ž¡�‘Gof–UUthe“graph.ަ�‘!GFigure–UU5“graphs“execution“times“for“t•¸ãw“o–UUmatrix“m�¸ãultiplication“algorithms“usingޤ��’» ¾Êsetcoords(log,log)ŽŽ¡�‘GÄto–yspšGecify“logarithmic“spacing“on“b˜oth“axes.‘|3The“data“ le“Êmatmul.d“Ägiv�¸ães“timings“for“b˜oth“algo-ŽŸ �‘Grithms:ŽŽŸŽŒ‹-2 ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ6ŽŽ �¿°� ýî²���Ÿ¡qÇ��’š WëK20–@.007861‘€standard“MM:“size,“secondsŽŽ¤ €��’š W30‘@.022051ŽŽ¡��’š W40‘@.050391ŽŽ¡��’š W60‘@.15922ŽŽ¡��’š W80‘@.4031ŽŽ¡��’š W120‘@1.53ŽŽ¡��’š W160‘@3.915ŽŽ¡��’š W240‘@18.55ŽŽ¡��’š W320‘@78.28ŽŽ¡��’š W480‘@279.24ŽŽ¡¡��’š W20–@.006611‘€Strassen:“size,“secondsŽŽ¡��’š W30‘@.020820ŽŽ¡��’š W40‘@.049219ŽŽ¡��’š W60‘@.163281ŽŽ¡��’š W80‘@.3975ŽŽ¡��’š W120‘@1.3125ŽŽ¡��’š W160‘@3.04ŽŽ¡��’š W240‘@9.95ŽŽ¡��’š W320‘@22.17ŽŽ¡��’š W480‘@72.60ŽŽŽŽŽŸgcŽ�‘GÄA‘ablank–oline“in“a“data“ le“ends“a“data“set.‘^ÐSubsequen�¸ãt“Êgdraw“Äcommands“access“additional“data“setsޤ �‘Gbš¸ãy–´'just“naming“the“same“data“ le“again.‘< Since“eac˜h“line“giv˜es“one“Åx“ÄcošGordinate“and“one“Åy‘Äco˜ordinate,Ž¡�‘Gcommen�¸ãtary–UUmaterial“after“the“second“data“ eld“on“a“line“is“ignored.Ž æI‘� ÿ&tŸeÔ8��ŸUÔ8��‘�éï9PSfile=mpgraph.5 llx=-68 lly=-29 urx=168 ury=147 rwi=2360ŽŽŽ�ŸÉÜq��’ qÆÊdraw‘?ýbegingraph(2.3in,2in);ŽŽ¡��’±Ãsetcoords(log,log);ŽŽ¡��’±Ãglabel.lft(btex–?ýSeconds“etex,OUT);ŽŽ¡��’±Ãglabel.bot(btex–?ýMatrix“size“etex,ŽŽ¡��’1½OUT);ŽŽ¡��’±Ãgdraw–?ý"matmul.d"“dashed“evenly;ŽŽ¡��’±Ãglabel.ulft(btex–?ýStandard“etex,8);ŽŽ¡��’±Ãgdraw‘?ý"matmul.d";ŽŽ¡��’±Ãglabel.lrt(btex–?ýStrassen“etex,7);ŽŽ¡��’±Ãendgraph;ŽŽŽŽŸqÅÿ�‘GÄFigure–ã»5:‘8úTimings“for“t•¸ãw“o–ã»matrix“mš¸ãultiplication“algorithms“with“the“corresp�Gonding“MetaP˜ost“input.ŽŽŸÚ�‘!GPlacing–P0a“Êsetcoords“Äcommand“b�Get•¸ãw“een›P0t“w“o˜Êgdraw˜Äcommands˜graphs˜t“w“o˜functions˜in˜di eren“tŽ¡�‘Gco�Gordinate–·esystems“as“shoš¸ãwn“in“Figure“6.‘="Whenev˜er“y˜ou“giv˜e“a“Êsetcoords“Äcommand,‘Öüthe“in˜terpreterŽ¡�‘Gexamines–8òwhat“has“b�Geen“dra�¸ãwn,›qÙselects“appropriate“Åx“Äand“Åy‘”ËÄranges,˜and“scales“ev�¸ãerything“to“ t.Ž¡�‘GEv•¸ãerything›1qdra“wn˜afterw“ard˜is˜in˜a˜new˜co�Gordinate˜system˜that˜need˜not˜ha“v“e˜an“ything˜in˜commonŽ¡�‘Gwith–›,the“old“cošGordinates“unless“Êsetrange“Äcommands“enforce“similar“co˜ordinate“ranges.‘3ºF‘ÿ*ªor“instance,Ž¡�‘Gthe›ì±t•¸ãw“o˜Êsetrange˜Äcommands˜force˜b•Goth˜co“ordinate˜systems˜to˜ha•¸ãv“e˜Åx˜Äranging˜from˜80˜to˜90˜andŽ¡�‘GÅy‘±.Ästarting–UUat“0.ŽŸËÌ�‘!GWhen–Öåyš¸ãou“use“m˜ultiple“co�Gordinate“systems,‘÷Iy˜ou“ha˜v˜e“to“spšGecify“where“the“axis“lab˜els“go.‘öxTheŽ¡�‘Gdefault–ÔQis“to“put“tic�¸ãk“marks“on“the“bšGottom“and“the“left“side“of“the“frame“using“the“co˜ordinate“systemŽ¡�‘Gin–UUe ect“when“the“Êendgraph“Äcommand“is“in�¸ãterpreted.‘qÇFigure“6“uses“theޤý}��’¶`ÁÊautogrid(,otick.lft)ŽŽ¡�‘GÄto–€_labšGel“the“left“side“of“the“graph“with“the“Åy‘Ü8Äco˜ordinates“in“e ect“b˜efore“the“Êsetcoords“Äcommand.ŽŽŸŽŒ‹6 ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ7ŽŽ �¿°� ÿ|Ù¼� þ‘ŒØ ¨ W���Ÿ­tÿ��Ÿ±Üq��‘H!Êdraw‘?ýbegingraph(6.5cm,4.5cm);ŽŽ¤ ��‘M`þsetrange(80,0,‘?ý90,whatever);ŽŽ¡��‘M`þglabel.bot(btex–?ýYear“etex,“OUT);ŽŽ¡��‘M`þglabel.lft(btex–?ý\vbox{\hbox{Emissions“in}“\hbox{thousands“of}ŽŽ¡��‘Wàø\hbox{metric–?ýtons}“\hbox{(heavy“line)}}etex,“OUT);ŽŽ¡��‘M`þgdraw–?ý"lead.d"“withpen“pencircle“scaled“1.5pt;ŽŽ¡��‘M`þautogrid(,otick.lft);ŽŽ¡��‘M`þsetcoords(linear,linear);ŽŽ¡��‘M`þsetrange(80,0,‘?ý90,whatever);ŽŽ¡��‘M`þglabel.rt(btex–?ý\vbox{\hbox{Micrograms}“\hbox{per“cubic}ŽŽ¡��‘Wàø\hbox{meter–?ýof“air}“\hbox{(thin“line)}}etex,“OUT);ŽŽ¡��‘M`þgdraw‘?ý"lead.d";ŽŽ¡��‘M`þautogrid(otick.bot,otick.rt);ŽŽ¡��‘M`þendgraph;ŽŽŽŽ ¥./�ŸML��‘=»�ï9PSfile=mpgraph.6 llx=-81 lly=-29 urx=264 ury=130 rwi=3450ŽŽŽŽŽŽ ·á �‘GÄFigure– 76:‘L¸Annš¸ãual“lead“emissions“and“a˜v˜erage“lev˜el“at“atmospheric“monitoring“stations“in“the“UnitedŽŸ �‘GStates.‘qÇThe–UUMetaPš¸ãost“input“is“sho˜wn“ab�Go˜v˜e“the“graph.ŽŽŽŸŽŒ‹@ÿ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ8ŽŽ �¿°� ý•@P�‘GThis–¿’suppresses“the“default“axis“labšGels,‘݆so“another“Êautogrid“Äcommand“is“needed“to“lab˜el“the“b˜ottomŽ© �‘Gand–UUrighš¸ãt“sides“of“the“graph“using“the“new“co�Gordinate“system.‘qÇThe“general“syn˜tax“isޤäd��‘RÝÊautogrid�(Ž�‘?ýÆh�Äaxis–UUlab�Gel“commandŽ‘V¸ñÆiŽ�‘cÀ Ê,Ž�‘jª±Æh�Äaxis–UUlab�Gel“commandŽ‘V¸ñÆiŽ�’É*ÀÊ)Ž�’ÑÀÆh�Äoption‘UUlistŽ‘,€ÆiŽŽŽ¡�‘GÄwhereŽŸÞß�����‘euïÆh�Äaxis–UUlab�Gel“commandŽ‘V¸ñÆiŽ’Æ½!�‘Çh�Äempt�¸ãyŽ‘8èÆiŽ‘(Ž6j�‘Çh�Ägrid–UUor“tic�¸ãkŽ‘0ñÍÆiŽ�‘=*«h�Älab�Gel‘UUsuxŽ‘/G$ÆiŽŽŽ¦���‘euïh�Ägrid–UUor“tic�¸ãkŽ‘0ñÍÆiŽ’ õò!–ÇÊgrid“Æj“Êitick“Æj“ÊotickŽŽŽŽŸ%Þß�‘GÄThe–UUÆhÄlabšGel“suxÆi“Äshould“b˜e“ÊlftÄ,“ÊrtÄ,“ÊtopÄ,“or“ÊbotÄ.ŽŸôõ�‘!GThe–U& rst“argumenš¸ãt“to“Êautogrid“Ätells“ho˜w“to“lab�Gel“the“Åx“Äaxis“and“the“second“argumen˜t“do�Ges“theަ�‘Gsame–øðfor“Åy�[ÙÄ.‘\—An“ÆhÄemptš¸ãyÆi“Äargumen˜t“suppresses“labšGeling“for“that“axis.‘\—Otherwise,‘!Öthe“ÆhÄlab˜el“suxÆiަ�‘GÄtells–6 whicš¸ãh“side“of“the“graph“gets“the“n˜umeric“lab�Gel.‘gZBe“careful“to“use“Êbot“Äor“Êtop“Äfor“the“Åx“Äaxis“andަ�‘GÊlft–7)Äor“Êrt“Äfor“the“Åy‘“Äaxis.‘g¹Use“Êotick“Äfor“out•¸ãw“ard›7)tic“k˜marks,‘=2Êitick˜Äfor˜in“w“ard˜tic“k˜marks,‘=2and˜Êgridަ�‘GÄfor–Ùègrid“lines.‘ÿ€The“ÆhÄoption“listÆi“Ätells“hoš¸ãw“to“dra˜w“the“tic˜k“marks“or“grid“lines.‘ÿ€Grid“lines“tend“toަ�‘GbšGe–1‡a“little“o•¸ãv“erp˜o“w“ering,‘8±so–1‡it“is“a“go˜o˜d“idea“to“givš¸ãe“a“Êwithcolor“Äoption“to“mak˜e“them“ligh˜t“gra˜y“soަ�‘Gthey–UUdo“not“mak�¸ãe“the“graph“to�Go“busy‘ÿ*ª.ŽŸ!îj��‘GÛ2.3Ž‘0ÑGExplicit–€Grids“and“F‘þàramingŽŸjI�‘GÄIn–l9case“Êautogrid“Äis“not“ exible“enough,‘qòaxis“lab�Gel“commands“generate“grid“lines“or“tic�¸ãk“marks“oneަ�‘Gat–UUa“time.‘qÇThe“syn�¸ãtax“isŽ¡��‘+‹:Æh�Ägrid–UUor“tic�¸ãkŽ‘0ñÍÆiŽ�‘dD%Ê.Ž�‘i„"Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ�’ ’dÊ(�Æh�Älab�Gel‘UUformatŽ‘5\{ÆiŽ‘=#™Ê,�‘ÀÆh�Än�¸ãumeric–UUor“string“expressionŽ‘{œÆiŽ’…#ŸÊ)Ž�’uîèÆh�Äoption‘UUlistŽ‘,€ÆiŽŽ¡�‘GÄwhere–ÂpÆhÄgrid“or“tic�¸ãkÆi“Äand“ÆhÄlabšGel“suxÆi“Äare“as“in“ÊautogridÄ,‘ßÑand“ÆhÄlab˜el“formatÆi“Äis“either“a“format“stringަ�‘Glikš¸ãe–UUÊ"%g"“Äor“a“picture“con˜taining“the“t˜yp�Geset“n˜umeric“lab�Gel.ŽŸôõ�‘!GThe–UUaxis“lab�Gel“commands“use“a“macroŽ¡��‘oýÊformat(�Æh�Äformat‘UUstringŽ‘9œ{ÆiŽ‘Ac™Ê,�‘ÀÆh�Än�¸ãumeric–UUor“string“expressionŽ‘{œÆiŽ’…#ŸÊ)ŽŽ¡�‘GÄto–Ûátš¸ãyp�Geset“n˜umeric“labšGels.‘kF‘ÿ*ªull“details“app˜ear“in“Section“4,‘ý„but“when“the“ÆhÄformat“stringÆi“Äis“Ê"%g"Ä,ަ�‘Git–{ßuses“decimal“notation“unless“the“n•¸ãum“b�Ger–{ßis“large“enough“or“small“enough“to“require“scien�¸ãti cަ�‘Gnotation.ޤôõ�‘!GThe–UUexample“in“Figure“7“in•¸ãv“ok“esަ��’Æ ¸Êformat("%g",y)ŽŽŸïo�‘GÄexplicitly–A8so“that“grid“lines“can“bšGe“placed“at“transformed“co˜ordinates.‘kIt“de nes“the“transformationަ��‘GÊnewyŽ‘';Ä(Åyš[ÙÄ)–‹ã=“Åy˜=Ä75–‡˜+�“lnŽ‘ ‡—Åy‘'BÄand–Ëishoš¸ãws“that“this“function“increases“almost“linearly‘ÿ*ª.��Ÿü^ÿ³6ŽŽ‘ PvÄThis“is“a“little“lik˜eަ�‘Gusing–UUlogarithmic“Åy�[ÙÄ-cošGordinates,“except“that“Åy‘±.Äis“mapp˜ed“to“Åyš[Ù=Ä75–8à+�“lnŽ‘ 8ßÅy‘±.Äinstead–UUof“just�“lnŽ‘ UTÅy˜Ä.Ž¡�‘!GFigure–UU7“uses“the“commandޤäd��’£ËNÊframe.Ž�’ÃK<Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ�’ý®Óh�Äoption‘UUlistŽ‘,€ÆiŽŽ¡�‘GÄto–Õdra�¸ãw“a“spšGecial“frame“around“the“graph.‘ñIn“this“case“the“ÆhÄlab˜el“suxÆi“Äis“Êllft“Äto“dra�¸ãw“just“theަ�‘Gb�Gottom–and“left“sides“of“the“frame.‘½Suxes“ÊlrtÄ,–J ÊulftÄ,“and–Êurt“Ädraš¸ãw“other“com˜binations“of“t˜w˜oަ�‘Gsides;–UUsuxes“ÊlftÄ,“ÊrtÄ,“ÊtopÄ,“Êbot“Ädraš¸ãw“one“side,“and“ÆhÄempt˜yÆi“Ädra˜ws“the“whole“frame.‘qÇF‘ÿ*ªor“exampleŽ¡��’¹ÀÊframe–?ýdashed“evenlyŽŽ‘GŸ”?‰ff­rŸ J=���‘ "5Ÿý-:¯6ŽŽ‘LܸThe–ÕXmanšÃŽual“[�5Ž‘@]“explains“ho˜w“ëKvardef“¸de nes“functions“and“ëKmlog“¸computes“logarithms.ŽŽŸŽŒ‹ E, ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’ ©RÄ9ŽŽ �¿°� ÿk Ø� þ´þ  «Fa���Ÿ’Îõ�ŸÉÜq��‘-áÊvardef–?ýnewy(expr“y)“=“(256/75)*y“+“mlog“y“enddef;ŽŽ¤ ��‘-ádraw‘?ýbegingraph(3in,2in);ŽŽ¡��‘3! glabel.lft(btex–?ý\vbox{\hbox{Population}“\hbox{in“millions}}“etex,“OUT);ŽŽ¡��‘3! gdraw‘?ý"ttimepop.d";ŽŽ¡��‘3! for‘?ýy=5,10,20,50,100,150,200,250:ŽŽ¡��‘=¡grid.lft(format("%g",y),–?ýnewy(y))“withcolor“.85white;ŽŽ¡��‘3! endforŽŽ¡��‘3! autogrid(grid.bot,)–?ýwithcolor“.85white;ŽŽ¡��‘3! frame.llft;ŽŽ¡��‘3! endgraph;ŽŽŽ ÚzC���‘VRÿï9PSfile=mpgraph.7 llx=-71 lly=-12 urx=225 ury=147 rwi=2960ŽŽŽŽŽŽ …:ÿ�‘GÄFigure–sÐ7:‘®¼Pš¸ãopulation“of“the“United“States“in“millions“v˜ersus“time“with“the“p�Gopulation“re-expressedޤ �‘Gas›í(Åp=Ä75–ž+�“lnŽ‘ žÅpÄ.‘9?The˜MetaP•¸ãost˜input˜sho“wn˜ab�Go“v“e˜the˜graph˜assumes˜a˜data˜ le˜Êttimepop.d˜ÄthatŽ¡�‘Ggiv•¸ães›UU(y“ear,˜Åp=Ä75–8à+�“lnŽ‘ 8ßÅpÄ)˜pairs.ŽŽŽŸŽŒ‹ T~ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ10ŽŽ �¿°� ý•@P�‘Gdraš¸ãws–T—all“four“sides“with“dashed“lines.‘qˆThe“default“four-sided“frame“is“dra˜wn“only“when“there“is“noŽ© �‘Gexplicit–UUÊframe“Äcommand.ŽŸ q�‘!GT‘ÿ*ªo–UUlabšGel“an“axis“as“Êautogrid“Ädo˜es“but“with“the“lab˜els“transformed“someho�¸ãw,“useޤÑ��’¼ë^Êauto.x– Äor“Êauto.yŽŽ¡�‘GÄfor–kpšGositioning“tic�¸ãk“marks“or“grid“lines.‘_$These“macros“pro˜duce“comma-separated“lists“for“use“in“Êforަ�‘GÄlošGops.‘=ä��ŸóqÇ��‘M`ýÊpath‘?ýp;ŽŽ¤ ��‘M`ýgdata("timepop.d",–?ýs,“augment.p(s1,“newy(scantokens“s2));“);ŽŽ¡��‘M`ýgdraw‘?ýp;ŽŽŽŽŸ†�‘GÄ(MetaPš¸ãost's–ößÊscantokens“Äprimitiv˜e“in˜terprets“a“string“as“if“it“w˜ere“the“con˜ten˜ts“of“an“input“ le.‘RJThisޤ �‘G nds–UUthe“n�¸ãumeric“v‘ÿqÇalue“of“data“ eld“Ês2Ä.)ŽŸ¾"�‘!GFigure–rß9“shoš¸ãws“ho˜w“to“use“Êaugment“Äto“read“m˜ultiple“column“data“and“mak˜e“m˜ultiple“paths.Ž¡�‘GP�¸ãaths›ìùÊp2Ä,–ØÊp3Ä,“Êp4Ä,“Êp5˜Ägiv•¸ãe˜cum“ulativ“e˜totals˜for˜columns˜2˜through˜5˜and˜pictures˜Êlab2˜Äthrough˜Êlab5Ž¡�‘GÄgiv�¸ãe–UUcorrespšGonding“lab˜els.‘qÇThe“expressionޤ[U��’‡ ÜÊimage(unfill–?ýbbox“lab[j];“draw“lab[j])ŽŽ¡�‘GÄexecutes–@the“givš¸ãen“dra˜wing“commands“and“returns“the“resulting“picture:‘ïž\Êunfill–?ýbbox“lab[j]Ä"ޤ �‘Gputs–®]doš¸ãwn“a“white“bac˜kground“and“\Êdraw‘?ýlab[j]Ä"“puts“the“lab�Gel“on“the“bac˜kground.‘|àThe“ÊgfillŽ¡�‘GÄcommand–ÔÓis“just“likš¸ãe“ÊgdrawÄ,‘î‡except“it“tak˜es“a“cyclic“path“and“ lls“the“in˜terior“with“a“solid“color.‘FñTheŽ¡�‘Gcolor–iis“blacš¸ãk“unless“a“Êwithcolor“Äclause“sp�Geci es“another“color.‘_ÎSee“the“man˜ual“[�5Ž‘]“for“explanationsŽ¡�‘Gof–UUÊfor“ÄlošGops,“arra�¸ãys,“colors,“and“path“construction“op˜erators“lik�¸ãe“Ê--Ä,“ÊcycleÄ,“and“ÊreverseÄ.ŽŸ&³Š��‘Gâ3Ž‘*èFManipulating–…Big“Num�Š=b�uÂersŽŸ¥=�‘GÄMetaPš¸ãost–]®inherits“a“ xed-p�Goin˜t“n˜um˜b�Ger“system“from“Kn˜uth's“ëIMET�ÇAF�Ž9ONT“Ä[�8Ž‘].‘:Num˜b�Gers“are“expressedŽ¡�‘Gin–ÈÎmš¸ãultiples“of“2�Ÿü^ÿµ³16Ž‘�µÄand“they“m˜ust“ha˜v˜e“absolute“v‘ÿqÇalue“less“than“32768.‘Ì2Kn˜uth“c˜hose“this“systemŽŽŸŽŒ‹ g0 ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ12ŽŽ �¿°�ŸŒ]� þr†% íÉ»��� ÿzK›�ŸŸÜq��‘0�Êdraw‘?ýbegingraph(3in,2in);ŽŽ¤ ��‘;glabel.lft(btex–?ý\vbox{\hbox{Quadrillions}\hbox{of“BTU}}“etex,“OUT);ŽŽ¡��‘;path‘?ýp[];ŽŽ¡��‘;numeric‘?ýt;ŽŽ¡��‘;gdata("energy.d",‘?ý$,ŽŽ¡��‘E�t:=0;‘?ýaugment.p1($1,0);ŽŽ¡��‘E�for–?ýj=2“upto“5:ŽŽ¡��‘U@ùt:=t+scantokens–?ý$[j];“augment.p[j]($1,t);ŽŽ¡��‘E�endfor)ŽŽ¡��‘;picture‘?ýlab[];ŽŽ¡��‘;lab2=btex–?ýcoal“etex;“lab3=btex“crude“oil“etex;ŽŽ¡��‘;lab4=btex–?ýnatural“gas“etex;“lab5=btex“hydroelectric“etex;ŽŽ¡��‘;for–?ýj=5“downto“2:ŽŽ¡��‘E�gfill–?ýp[j]--reverse“p[j-1]--cycle“withcolor“.16j*white;ŽŽ¡��‘E�glabel.lft(image(unfill–?ýbbox“lab[j];“draw“lab[j]),“.7+length“p[j]);ŽŽ¡��‘;endforŽŽ¡��‘;endgraph;ŽŽŽ  €÷���‘UR ï9PSfile=mpgraph.9 llx=-79 lly=-19 urx=219 ury=147 rwi=2980ŽŽŽŽŽŽ �¾Y��‘'ÄFigure–UU9:‘qÇA“graph“of“U.S.“ann�¸ãual“energy“pro�Gduction“and“the“commands“that“generated“itŽŽŽŽŸŽŒ‹ p„ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ13ŽŽ �¿°� ý•@P�‘GbšGecause–‹ùit“is“p˜erfectly“adequate“for“fonš¸ãt“design,‘´?and“it“guaran˜teed“to“giv˜e“iden˜tical“results“on“all“t˜yp�Gesޤ �‘Gof–é®computers.‘MåFixed-p�Goinš¸ãt“n˜um˜b�Gers“are“seldom“a“problem“in“MetaP˜ost“b�Gecause“all“computations“areŽ¡�‘Gbased–~�on“cošGordinates“that“are“limited“b�¸ãy“the“size“the“pap˜er“on“whic�¸ãh“the“output“is“to“b˜e“prin�¸ãted.‘*0ThisŽ¡�‘GdošGes–œ�not“hold“for“the“input“data“in“a“graph-dra�¸ãwing“application.‘GyAlthough“graphs“lo˜ok“b˜est“whenŽ¡�‘GcošGordinate–Î>axes“are“lab˜eled“with“n•¸ãum“b˜ers–Î>of“reasonable“magnitude,‘ìxthe“strict“limits“of“ xed-p˜oin�¸ãtŽ¡�‘Garithmetic–UUwš¸ãould“b�Ge“incon˜v˜enien˜t.Ž©�‘!GA–UUsimple“w•¸ãa“y–UUto“handle“large“n•¸ãum“b�Gers–UUis“to“include“the“lineޤ��’Ë`µÊinput‘?ýsarithŽŽ¡�‘GÄand–®5then“use“binary“opšGerators“ÊSaddÄ,–Ï¢ÊSsubÄ,“ÊSmulÄ,“and–®5ÊSdiv“Äin“place“of“Ê+Ä,–Ï¢Ê-Ä,“Ê*Ä,“and–®5Ê/Ä.‘:These“op˜eratorsޤ �‘Gare–Åvinecienš¸ãt“but“v˜ery“ exible.‘Â+They“accept“n˜um˜bšGers“or“strings“and“return“strings“in“exp˜onen�¸ãtialŽ¡�‘Gnotation–UUwith“the“exp�Gonenš¸ãt“mark˜ed“b˜y“\ÊeÄ";“e.g.,“Ê"6.7e-11"“Ämeans“6Å:Ä7–8àÆ“Ä10�Ÿü^ÿµ³11Ž‘¸çÄ.ަ�‘!GThe–UUunary“op�Gerator��Ÿü^ÿ³7ŽŽŽ¡��’ÎGÃÊSabsŽ�’æ� Æh�ÄstringŽ‘YÆiŽŽ¦�‘GÄ nds–™a“string“the“represen�¸ãts“the“absolute“v‘ÿqÇalue.‘<ÛBinary“opšGerators“ÊSleq“Äand“ÊSneq“Äp˜erform“n�¸ãumericŽ¡�‘Gcomparisons–UUon“strings“and“return“b•Go“olean‘UUresults.ަ�‘!GThe‘UUop�GerationŽ¡��’ÉÆÊScvnumŽ�’ëÝ Æh�ÄstringŽ‘YÆiŽŽ¦�‘GÄ nds–““the“nš¸ãumeric“v‘ÿqÇalue“for“a“string“if“this“can“b�Ge“done“without“o˜v˜er o˜wing“MetaP˜ost's“ xed-p�Goin˜tŽ¡�‘Gn•¸ãum“bšGer–ý†system.‘jYIf“the“string“do˜es“not“conš¸ãtain“\ÊeÄ",‘'’it“is“m˜uc˜h“more“ecien˜t“to“use“the“primitiv˜eŽ¡�‘Gop�GerationŽ¡��’¾‡ÌÊscantokensŽ�’ö]Æh�ÄstringŽ‘YÆiŽŽŸ�‘!GÄThe›Üab�Go•¸ãv“e˜op�Gerators˜are˜based˜on˜a˜lo“w-lev“el˜pac“k‘ÿqÇage˜that˜manipulates˜n“um“b�Gers˜in˜\ÊMlog˜Äform."Ž¡�‘GA›UUn•¸ãum“b�Ger˜Åx˜Äin˜ÊMlog˜Äform˜represen“tsŽŸ³Ê�’°!£Å�ŸûÞÿ³2�Ÿüûr«16Ž‘N@ó 0e—rcmmi7´xŽ‘S—Å;�‘ ª©ÄwhereŽ‘(•UÅ–ÇÄ=“ÆÅe�ŸûÞÿ³2�Ÿüûró°Ü0ncmsy5­«24ŽŽ‘5bÅ:ŽŸ�‘GÄAnš¸ãy–urv‘ÿqÇalue“b�Get˜w˜een“1Å:Ä61–NIÆ“Ä10�Ÿü^ÿµ³28Ž‘.YÄand›ur3Å:Ä88“Æ“Ä10�Ÿü^ÿ³55Ž‘ îXÄcan˜b�Ge˜represen•¸ãted˜this˜w“a“y‘ÿ*ª.‘Ò(There˜is˜a˜constan“tŽ¡�‘GÊMten–UUÄsucš¸ãh“that“Åk‘‰wÆ�‘8àÊMtenŽ‘Ž)Ärepresen˜ts“10�Ÿü^ÿ´kŽ‘@åÄfor“an˜y“in˜teger“Åk‘¥ìÄin“the“in˜terv‘ÿqÇal“[ÆÄ29Å;‘ª¨Ä55].)ަ�‘!GThe–„Omain“reason“for“menš¸ãtioning“ÊMlog“Äform“is“that“it“allo˜ws“graph“data“to“b�Ge“manipulated“as“aŽ¡�‘GMetaP�¸ãost–UUpath.‘qÇThe“functionŽ¡��’¶d?ÊMreadpath(�Æh�Ä le‘UUnameŽ‘'qÌÆiŽ‘/8êÊ)ŽŽ¦�‘GÄreads–ö°a“data“ le“and“returns“a“path“where“all“the“co�Gordinates“are“in“ÊMlog“Äform.‘R;An“in�¸ãternal“v‘ÿqÇariableŽ¡�‘GÊGpaths–XfÄdetermines“whether“Êgdraw“Äand“Êgfill“ÄexpšGect“paths“to“b˜e“giv�¸ãen“in“ÊMlog“Äform.‘zûF‘ÿ*ªor“example,Ž¡�‘Gthis–UUgraphs“the“data“in“Êagepop91.d“Äwith“Åy‘±.Äco�Gordinates“divided“b�¸ãy“one“million:ŽŸã���ŸùqÇ��‘g îÊinterim‘?ýGpaths:=log;ŽŽ¡��‘g îgdraw–?ýMreadpath("agepop91.d")“shifted“(0,-6*Mten);ŽŽŽŽŸ'Ä��‘Gâ4Ž‘*èFT•Š=ypšuÂesetting‘…Num“b˜ersŽŸç�‘GÄThe–UUgraph“pacš¸ãk‘ÿqÇage“needs“to“compute“axis“lab�Gels“and“then“t˜yp�Geset“them.‘qÇThe“macroŽŸ��‘h'ÀÊformat(�Æh�Ästring‘UUexpressionŽ‘IG%ÆiŽ‘QCÊ,�‘ÀÆh�Än�¸ãumeric–UUor“string“expressionŽ‘{œÆiŽ’…#ŸÊ)ŽŽ‘GŸæf‰ff­rŸ J=���‘ "5Ÿý-:¯7ŽŽ‘LܸThe–\„argumen�ÃŽt“to“a“unary“opšŸ'EŽ‘ãxX“users“isŽŸP8��ŸúG��‘M`ýÊinit_numbers(btex$-$etex,–?ýbtex$1$etex,“btex${\times}10$etex,ŽŽ¡��‘b`ñbtex${}^-$etex,‘?ýbtex${}^2$etex)ŽŽŽŽŸã�‘GÄThe–4› rst“argumenš¸ãt“tells“ho˜w“to“t˜yp�Geset“a“leading“min˜us“sign;‘?ƒthe“second“argumen˜t“is“an“example“ofŽ¡�‘Ga–D1-digit“manš¸ãtissa;‘IÚthird“comes“whatev˜er“to“put“after“the“man˜tissa“in“scien˜ti c“notation;‘IÚnext“comeŽ¡�‘Ga–UUleading“minš¸ãus“sign“for“the“exp�Gonen˜t“and“a“sample“1-digit“exp�Gonen˜t.ަ�‘!GPicture–äDv‘ÿqÇariable“ÊFe_plus“Ägivš¸ães“a“leading“plus“sign“for“p�Gositiv˜e“n˜um˜b�Gers,‘Gÿand“ÊFe_base“Ägiv˜esŽ¡�‘Gwhatevš¸ãer–�àshould“precede“the“exp�Gonen˜t“when“t˜ypšGesetting“a“p˜o•¸ãw“er–�àof“ten.‘hCalling“Êinit_numbersŽ¡�‘GÄinitializes–ƒ·ÊFe_plus“Äto“an“emptš¸ãy“picture“and“constructs“ÊFe_base“Äfrom“its“second“and“third“argumen˜ts.ŽŸ&Ç¢��‘Gâ5Ž‘*èFConclusionŽŸ³I�‘GÄThe–Ø(graph“pacš¸ãk‘ÿqÇage“mak˜es“it“con˜v˜enien˜t“to“generate“graphs“from“within“the“MetaP˜ost“language.‘H TheŽ¡�‘Gprimary–ÈbšGene ts“are“the“p˜o•¸ãw“er–Èof“the“MetaPš¸ãost“language“and“its“abilit˜y“to“in˜teract“with“T�‘þU>Ÿ'EŽ‘ãxX“or“tro Ž¡�‘Gfor–Ft�¸ãypšGesetting“lab˜els.‘l¬T�¸ãyp˜eset“lab˜els“can“b˜e“stored“in“picture“v›ÿqÇariables“and“manipulated“in“v˜ariousŽ¡�‘Gw•¸ãa“ys›UUsuc“h˜measuring˜the˜b•Gounding˜b“o•¸ãx˜and˜pro“viding˜a˜white˜bac“kground.ަ�‘!GW‘ÿ*ªe›.Dha•¸ãv“e˜seen˜ho“w˜to˜generate˜shaded˜regions˜and˜con“trol˜line˜width,–6color,“and˜st�¸ãyles˜of˜dashedŽ¡�‘Glines.›‘„Numerous–_éother“v‘ÿqÇariations“are“p�Gossible.˜The“full“MetaPš¸ãost“language“[�5Ž‘]“pro˜vides“man˜y“otherŽ¡�‘GpšGoten�¸ãtially–^Zuseful“features.‘ŒÕIt“also“has“enough“computing“p˜o•¸ãw“er–^Zto“b˜e“useful“for“generating“andŽ¡�‘Gpro�Gcessing‘UUdata.ŽŽŸŽŒ‹ƒ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ15ŽŽ �¿°� ý•@P��‘GâAŽ‘/%¶Summary–…of“the“Graph“P•Š=ac“k‘ÿ{ageŽŸç�‘GÄIn–!/the“folloš¸ãwing“descriptions,‘+�italic“letters“suc˜h“as“Åw‘fÄand“Åh“Ädenote“expression“parameters“and“w˜ordsޤ �‘Gin–á angle“brac•¸ãk“ets–á denote“other“synš¸ãtactic“elemen˜ts.‘KUnless“sp�Geci ed“otherwise,‘øNexpression“parametersŽ¡�‘Gcan–Ïvb�Ge“either“nš¸ãumerics“or“strings.‘à*An“ÆhÄoption“listÆi“Äis“a“list“of“dra˜wing“options“suc˜h“as“ÊwithcolorŽ¡�‘G.5white–UUÄor“Êdashed‘?ýevenlyÄ;“a“ÆhÄlab�Gel“suxÆi“Äis“one“of“ÊlftÄ,“ÊrtÄ,“ÊtopÄ,“ÊbotÄ,“ÊulftÄ,“ÊurtÄ,“ÊllftÄ,“ÊlrtÄ.ŽŸ!þ6��‘GÛA.1Ž‘4CGraph‘€AdministrationŽŸuT���‘GÊbegingraph(Åw�DãÊ,ÅhÊ)ŽŽ‘h�¹ÄBegin–~a“new“graph“with“the“frame“width“and“heighš¸ãt“giv˜en“b˜y“n˜umeric“parametersŽ¡�‘+GÅw‘š8Äand‘UUÅhÄ.ޤ���‘GÊendgraphŽŽ‘A/ÄEnd–UUa“graph“and“return“the“resulting“picture.Ž¡���‘GÊsetcoords(Åt�Ÿÿ´xŽ‘äÊ,‘ÀÅt�Ÿÿ´yŽ‘·Ê)ŽŽ‘hátÄSet–¶up“a“new“cošGordinate“system“as“sp˜eci ed“bš¸ãy“n˜umeric“ ags“Åt�Ÿÿ´xŽ‘äÄ,‘&oÅt�Ÿÿ´yŽ‘·Ä.‘^=Flag“v‘ÿqÇaluesŽ© �‘+Gare–UUÆ�ÊlinearŽ‘"ÕCÄand“Æ�ÊlogŽ‘¿÷Ä.Ž¡���‘GÊsetrange(�Æh�Äco�GordinatesŽ‘1Î@ÆiŽ‘9•^Ê,�‘ÀÆh�Äco�GordinatesŽ‘1Î@ÆiŽ‘;U`Ê)ŽŽ’Å»äÄSet–ÏBthe“lo•¸ãw“er–ÏBand“uppšGer“limits“for“the“curren�¸ãt“co˜ordinateަ�‘+Gsystem.‘!LEac�¸ãh–cäÆhÄcošGordinatesÆi“Äcan“b˜e“a“single“pair“expression“or“t•¸ãw“o›cän“umeric˜or˜string˜expressions.ŽŸ!þ6��‘GÛA.2Ž‘4CDra� wing–€and“Lab�`elingŽŸuT�‘GÄAll–ÃÙof“the“dra�¸ãwing“and“labšGeling“commands“can“b˜e“follo•¸ãw“ed›ÃÙb“y˜an˜ÆhÄoption˜listÆiÄ.‘½TIn˜addition˜to˜theަ�‘Gusual–o–MetaPš¸ãost“dra˜wing“options,‘¶&the“list“can“con˜tain“a“Êplot“ÆhÄpictureÆi“Äclause“to“plot“a“sp�Geci edަ�‘Gpicture–UUat“eacš¸ãh“data“p�Goin˜t.ŽŸ�‘!GThe–©Ìdra�¸ãwing“and“lab�Geling“commands“are“closely“related“to“a“set“of“similarly“named“commandsަ�‘Gin–�plain“MetaPš¸ãost.‘I&The“Êgdrawarrow“Äand“Êgdrawdblarrow“Äcommands“are“included“to“main˜tain“thisަ�‘Grelationship.ŽŸ���‘GÊgdotlabel.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ‘7BÊ(ÅpÊ,�‘ÀÆh�Älo�GcationŽ‘"¸êÆiŽ‘,@ Ê)ŽŽ’çlÄThis–ÿ‡is“lik�¸ãe“Êglabel“Äexcept“it“also“puts“a“dot“at“the“lo�Gcationަ�‘+Gb•Geing‘UUlab“eled.Ž¡���‘GÊgdraw‘?ýÅpŽŽ‘;™5ÄDra�¸ãw–þypath“ÅpÄ,›Øor“if“Åp“Äis“a“string,˜read“cošGordinate“pairs“from“ le“Åp“Äand“dra�¸ãw“a“p˜olygonal“lineަ�‘+Gthrough‘UUthem.Ž¡���‘GÊgdrawarrow‘?ýÅpŽŽ‘UÙ&ÄThis–UUis“likš¸ãe“Êdgraw“Åp“Äexcept“it“adds“an“arro˜whead“at“the“end“of“the“path.Ž¡���‘GÊgdrawdblarrow‘?ýÅpŽŽ‘e™ÄThis–UUis“likš¸ãe“Êdgraw“Åp“Äexcept“it“adds“an“arro˜wheads“at“eac˜h“end“of“the“path.Ž¡���‘GÊgfill‘?ýÅpŽŽ‘;™5ÄFill–:ˆcyclic“path“Åp“Äor“read“co�Gordinates“from“the“ le“named“b�¸ãy“string“Åp“Äand“ ll“the“resultingަ�‘+Gp�Golygonal‘UUoutline.Ž¡���‘GÊglabel.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ‘7BÊ(ÅpÊ,�‘ÀÆh�Älo�GcationŽ‘"¸êÆiŽ‘,@ Ê)ŽŽ’³çuÄIf–:QÅp“Äis“not“a“picture,‘s�it“should“bšGe“a“string.‘ ºT�¸ãyp˜eset“it“usingަ�‘+GÊdefaultfontÄ,‘áthen–Ãplace“it“near“the“giv�¸ãen“lošGcation“and“o set“as“sp˜eci ed“b�¸ãy“the“ÆhÄlab˜el“suxÆiÄ.ަ�‘+GThe–äˆÆhÄlošGcationÆi“Äcan“b˜e“Åx“Äand“Åy‘@aÄco˜ordinates,›ûa“pair“giving“Åx“Äand“Åy�[ÙÄ,˜a“n�¸ãumerc“v‘ÿqÇalue“giving“a“timeަ�‘+Gon–UUthe“last“path“dra�¸ãwn,“or“ÊOUT“Äto“lab�Gel“the“outside“of“the“graph.ŽŽŸŽŒ‹’§ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ16ŽŽ �¿°� ý•@P��‘GÛA.3Ž‘4CGrids,–€Tic� k“Marks,“and“F‘þàramingŽŸuT���‘GÊauto.�Æh�Êx–UUÄor“ÊyŽ‘PÆiŽŽŽ‘S-¦ÄGenerate–UUdefault“Åx“Äor“Åy‘±.Äco�Gordinates“for“tic�¸ãk“marks.Ž©���‘GÊautogrid(�Æh�Äaxis–UUlab�Gel“commandŽ‘V¸ñÆiŽ‘^€Ê,�‘ÀÆh�Äaxis–UUlab�Gel“commandŽ‘V¸ñÆiŽ‘`@Ê)ŽŽ’‘FÄDra�¸ãw–Ødefault“axis“labšGels“using“the“sp˜eci-ޤ �‘+G ed–wÞcommands“for“the“Åx“Äand“Åy‘Ó·Äaxes.‘ÙaAn“ÆhÄaxis“labšGel“commandÆi“Äma�¸ãy“b˜e“ÆhÄemptš¸ãyÆi“Äor“it“ma˜y“b�GeŽ¡�‘+GÊitickÄ,–UUÊotickÄ,“or“Êgrid“Äfollo•¸ãw“ed›UUb“y˜a˜ÆhÄlab�Gel˜suxÆiÄ.ަ���‘GÊframe.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ�‘:ã–h�Äoption‘UUlistŽ‘,€ÆiŽŽŽ’¥»ðÄDraš¸ãw–>Ja“frame“around“the“graph,‘x‡or“dra˜w“the“part“of“the“frameŽ¡�‘+GspšGeci ed–UUb�¸ãy“the“ÆhÄlab˜el“suxÆiÄ.ަ���‘GÊgrid.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ‘7Bóò"V cmbx10É(Åf‘�É,Åz�p—É)ŽŽ‘“ÄDraš¸ãw–¨‚a“grid“line“across“the“graph“from“the“side“sp�Geci ed“b˜y“the“ÆhÄlab�GelŽ¡�‘+GsuxÆiÄ,‘‰and–ëålabšGel“it“there“using“format“string“Åf‘ÿtÄand“co˜ordinate“v‘ÿqÇalue“Åz�p—Ä.‘5vIf“Åf‘ÿtÄis“a“picture,‘‰itŽ¡�‘+Ggiv�¸ães–UUthe“lab�Gel.ަ���‘GÊitick.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ‘7BÉ(Åf‘�É,Åz�p—É)ŽŽ’„ÓÄThis–UUis“likš¸ãe“Êgrid“Äexcept“it“dra˜ws“an“in˜w˜ard“tic˜k“mark.ަ���‘GÊotick.�Æh�Älab�Gel‘UUsuxŽ‘/G$ÆiŽ‘7BÉ(Åf‘�É,Åz�p—É)ŽŽ’„ÓÄThis–UUis“likš¸ãe“Êgrid“Äexcept“it“dra˜ws“an“out˜w˜ard“tic˜k“mark.ŽŸ!þ6��‘GÛA.4Ž‘4CMiscellaneous‘€CommandsŽŸuT���‘GÊaugment.�Æh�Äv‘ÿqÇariableŽ‘"1ÍÆiŽ‘)øëÊ(�Æh�Äco�GordinatesŽ‘1Î@ÆiŽ‘9•^Ê)ŽŽ’¯rÄApp•Gend›UUÆhÄco“ordinatesÆi˜Äto˜the˜path˜stored˜in˜ÆhÄv‘ÿqÇariableÆiÄ.ަ���‘GÊformat(Åf‘�Ê,‘ÀÅxÊ)ŽŽ‘SÁ0ÄT�¸ãyp�Geset–UUÅx“Äaccording“to“format“string“Åf‘häÄand“return“the“resulting“picture.ަ���‘GÊgdata(Åf‘�Ê,�‘ÀÆh�Äv‘ÿqÇariableŽ‘"1ÍÆiŽ‘+¸íÊ,�‘ÀÆh�ÄcommandsŽ‘.*²ÆiŽ‘7±ÒÊ)ŽŽ’¯´ÑÄRead–1Hthe“ le“named“b�¸ãy“string“Åf‘D×Äand“execute“ÆhÄcommandsÆi“ÄforŽ¡�‘+Geacš¸ãh–UUinput“line“using“the“ÆhÄv‘ÿqÇariableÆi“Äas“an“arra˜y“to“store“data“ elds.ަ���‘GÊinit�‘¡E‰ff&fŽ‘Ç«numbers(ÅsÊ,–ÀÅmÊ,“ÅxÊ,“ÅtÊ,“ÅeÊ)ŽŽ’–Œ ÄPro•¸ãvide››X v“e˜pictures˜as˜templates˜for˜future˜Êformat˜Äop�Gerations:‘ýÍÅs˜ÄisŽ¡�‘+Ga–‹leading“minš¸ãus;‘¥ÿÅm“Äis“a“sample“man˜tissa;‘¥ÿÅx“Äfollo˜ws“the“man˜tissa;‘¥ÿÅt“Äis“a“leading“min˜us“for“theŽ¡�‘+Gexp�Gonen�¸ãt‘UUÅeÄ.ަ���‘GÊMreadpath(Åf‘�Ê)ŽŽ‘VÊ ÄRead–UUa“path“for“the“data“ le“named“b�¸ãy“string“Åf‘häÄand“return“it“in“\ÊMlog“Äform".ŽŸ!þ6��‘GÛA.5Ž‘4CArithmetic–€on“Numeric“StringsŽŸuT�‘GÄIt–UUis“necessary“to“Êinput‘?ýsarith“Äb�Gefore“using“the“follo�¸ãwing“macros:ŽŸ���‘GÊSabs‘?ýÅxŽŽ‘7TÄCompute–UUÆjÅxÆj“Äand“return“a“n�¸ãumeric“string.ަ���‘GÅx–?ýÊSadd“ÅyŽŽ‘A‹IÄCompute›UUÅx–8àÄ+“Åy‘±.Äand˜return˜a˜n�¸ãumeric˜string.ަ���‘GÊScvnum‘?ýÅxŽŽ‘AˆNÄReturn–UUthe“n�¸ãumeric“v‘ÿqÇalue“for“string“ÅxÄ.ަ���‘GÅx–?ýÊSdiv“ÅyŽŽ‘A‹IÄCompute–UUÅx=y‘±.Äand“return“a“n�¸ãumeric“string.ަ���‘GÅx–?ýÊSleq“ÅyŽŽ‘A‹IÄReturn–UUthe“b•Go“olean–UUresult“of“the“comparison“Åx–ÇÆ“Åy�[ÙÄ.ަ���‘GÅx–?ýÊSmul“ÅyŽŽ‘A‹IÄCompute›UUÅx–8àÆ“Åy‘±.Äand˜return˜a˜n�¸ãumeric˜string.ަ���‘GÅx–?ýÊSneq“ÅyŽŽ‘A‹IÄReturn–UUthe“b•Go“olean–UUresult“of“the“comparison“Åx–ÇÆ6Ä=“Åy�[ÙÄ.ަ���‘GÅx–?ýÊSsub“ÅyŽŽ‘A‹IÄCompute›UUÅx–8àÆ“Åy‘±.Äand˜return˜a˜n�¸ãumeric˜string.ŽŽŸŽŒ‹ŸÚ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ17ŽŽ �¿°� ý•@P��‘GÛA.6Ž‘4CInš ternal–€V‘þàariables“and“Constan˜tsŽŸuT���‘GÊAutoformŽŽ‘A/ÄF‘ÿ*ªormat–UUstring“used“b�¸ãy“ÊautogridÄ.–qÇDefault:“Ê"%g"Ä.ޤ���‘GÊFe�‘¡E‰ff&fŽ‘Ç«baseŽŽ‘:XàÄWhat–UUprecedes“the“exp�Gonenš¸ãt“when“t˜ypšGesetting“a“p˜o•¸ãw“er–UUof“ten.Ž¡���‘GÊFe�‘¡E‰ff&fŽ‘Ç«plusŽŽ‘:XàÄPicture–UUof“the“leading“plus“sign“for“pšGositiv�¸ãe“exp˜onen�¸ãts.Ž¡���‘GÊGmarksŽŽ‘6‘5ÄMinim•¸ãum›UUn“um“b�Ger˜of˜tic“k˜marks˜p�Ger˜axis˜for˜Êauto˜Äand˜ÊautogridÄ.–qÇDefault:“4.Ž¡���‘GÊGminlogŽŽ‘;Ñ2ÄMinim�¸ãum–Õ•largest/smallest“ratio“for“logarithmic“spacing“with“Êauto“Äand“ÊautogridÄ.‘G2Default:Ž© �‘+G3.0.Ž¡���‘GÊGpathsŽŽ‘6‘5ÄCošGde–!»for“co˜ordinates“used“in“Êgdraw“Äand“Êgfill“Äpaths:‘ ’Êlinear“Äfor“standard“form,‘TÔlog“forަ�‘+G\ÊMlog‘UUÄform".Ž¡���‘GÊMtenŽŽ‘,;ÄThe–UU\ÊMlog“Äform"“for“10.0ŽŸ'Ä��‘GâBŽ‘.hENew–…Language“F‘þž¸eaturesŽŸç�‘GÄThe–lÊgraph.mp“Ämacros“and“the“arithmetic“routines“in“Êmarith.mp“Äand“Êsarith.mp“Äuse“v‘ÿqÇarious“languageަ�‘Gfeatures–NŽthat“wš¸ãere“in˜tro�Gduced“in“V‘ÿ*ªersion“0.60“of“the“MetaP˜ost“language.‘0W‘ÿ*ªe“summarize“these“featuresަ�‘Ghere–UUbšGecause“they“are“not“co•¸ãv“ered–UUin“existing“do˜cumen�¸ãtation“[�5Ž‘,�“6Ž‘UV].‘qÇAlso“new“is“the“built-in“macroޤ��’ª}Êimage(�Æh�Ädra�¸ãwing‘UUcommandsŽ‘T@ ÆiŽ‘\*Ê)ŽŽ¡�‘GÄthat–UUwš¸ãas“used“in“Section“2.4“to“ nd“the“picture“pro�Gduced“b˜y“a“sequence“of“dra˜wing“commands.ŽŸ!þ6��‘GÛB.1Ž‘3ª+Reading–€and“W‘þàriting“FilesŽŸuT�‘GÄA–UUnew“op�Geratorަ��’¼™�ÊreadfromŽ�’éîÍÆh�Ä le‘UUnameŽ‘'qÌÆiŽŽ¤�‘GÄreturns–“�a“string“giving“the“next“line“of“input“from“the“named“ le.‘1,The“ÆhÄ le“nameÆi“Äcan“b�Ge“an�¸ãy“primaryަ�‘Gexpression–Üüof“t�¸ãypšGe“string.‘½If“the“ le“has“ended“or“cannot“b˜e“read,‘þæthe“result“is“a“string“consistingަ�‘Gof–ga“single“nš¸ãull“c˜haracter.‘ºýThe“preloaded“Êplain“Ämacro“pac˜k‘ÿqÇage“in˜tro�Gduces“the“name“ÊEOF‘5Äfor“thisަ�‘Gstring.‘^After–ùhÊreadfrom“Ähas“returned“ÊEOFÄ,“additional“reads“from“the“same“ le“cause“the“ le“to“b�Geަ�‘Greread–UUfrom“the“start.Ž¡�‘!GThe–UUopp�Gosite“of“Êreadfrom“Äis“the“commandޤ��’•ÂÊwriteŽ�’²�Æh�Ästring‘UUexpressionŽ‘IG%ÆiŽ�’ ÊtoŽ�’€šÆh�Ä le‘UUnameŽ‘'qÌÆiŽŽ¡�‘GÄThis–&Èwrites“a“line“of“text“to“the“spšGeci ed“output“ le,‘0op˜ening“the“ le“ rst“if“necessary‘ÿ*ª.‘bCAll“suc�¸ãh“ lesަ�‘Gare–X!closed“automatically“when“the“program“terminates.‘z*They“can“also“b�Ge“closed“explicitly“b�¸ãy“usingަ�‘GÊEOF‘•bÄas–•rthe“ÆhÄstring“expressionÆiÄ.‘2The“only“w•¸ãa“y–•rto“tell“if“a“Êwrite“Äcommand“has“succeeded“is“to“closeަ�‘Gthe–UU le“and“use“Êreadfrom“Äto“lo�Gok“at“it.ŽŽŸŽŒ‹­" ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ18ŽŽ �¿°� ý•@P��‘GÛB.2Ž‘3ª+Extracting–€Information“from“PicturesŽŸuT�‘GÄMetaPš¸ãost–skpictures“are“comp�Gosed“of“strok˜ed“lines,› š lled“outlines,˜pieces“of“t�¸ãyp�Geset“text,˜clipping“paths,ޤ �‘Gand–@Êsetbounds“Äpaths.‘½ˆ(A‘Êsetbounds“Äpath“giv�¸ães“an“arti cial“bšGounding“b˜o�¸ãx“as“is“needed“for“T�‘þU>Ÿ'EŽ‘ãxXŽ¡�‘Goutput.)‘nêA‘L½picture–L¿can“ha•¸ãv“e›L¿man“y˜comp�Gonen“ts˜of˜eac“h˜t“yp•Ge.‘nêThey˜can˜b“e˜accessed˜via˜an˜iterationŽ¡�‘Gof–UUthe“formޤ��‘Q‘ÊforŽ�‘d.ÝÆh�Äsym•¸ãb�Golic‘UUtok“enŽ‘AU_ÆiŽ�’° ¯ÊwithinŽ�’ÓuòÆh�Äpicture‘UUexpressionŽ‘NÇ%ÆiŽ�’*5Ê:Ž�’2™‡Æh�Älo�Gop‘UUtextŽ‘'qÎÆiŽ�’e'ÈÊendforŽŽ¡�‘GÄThe–±ÆhÄlošGop“textÆi“Äcan“b˜e“an�¸ãything“that“is“balanced“with“resp˜ect“to“Êfor“Äand“ÊendforÄ.‘…The“ÆhÄsym�¸ãb˜olicޤ �‘Gtok�¸ãenÆi–“yÄis“a“lošGop“v‘ÿqÇariable“that“scans“the“comp˜onenš¸ãts“of“the“picture“in“the“order“in“whic˜h“they“w˜ereŽ¡�‘Gdra•¸ãwn.‘ÀÛThe›Åcomp�Gonen“t˜for˜a˜clipping˜or˜Êsetbounds˜Äpath˜includes˜ev“erything˜the˜path˜applies˜to.Ž¡�‘GThš¸ãus–è]if“a“single“clipping“or“Êsetbounds“Äpath“applies“to“ev˜erything“in“the“ÆhÄpicture“expressionÆiÄ,‘ theŽ¡�‘Gwhole–²=picture“could“bšGe“though�¸ãt“of“as“one“big“comp˜onenš¸ãt.‘ˆ~In“order“to“mak˜e“the“con˜ten˜ts“of“suc˜h“aŽ¡�‘Gpicture–¤yaccessible,‘¸Bthe“Êfor��Å:–ª¨:“:ŽŽ‘ UOÊwithin“Äiteration“ignores“the“enclosing“clipping“or“Êsetbounds“Äpath“inŽ¡�‘Gthis‘UUcase.Ž©�‘!GOnce–dœthe“Êfor��Å:–ª¨:“:ŽŽ‘ UOÊwithin“Äiteration“has“found“a“picture“comp�Gonenš¸ãt,‘hmthere“are“n˜umerous“op�GeratorsŽ¡�‘Gfor–UUidenš¸ãtifying“it“and“extracting“relev‘ÿqÇan˜t“information.‘qÇThe“op�Geratorޤ��’©uýÊstrokedŽ�’Ñ‹=Æh�Äprimary‘UUexpressionŽ‘RøïÆiŽŽ¡�‘GÄtests–ŽXwhether“the“expression“is“a“knoš¸ãwn“picture“whose“ rst“comp�Gonen˜t“is“a“strok˜ed“line.‘ÑSimilarly‘ÿ*ª,ޤ �‘Gthe–³–Êfilled“Äand“Êtextual“ÄopšGerators“return“Êtrue“Äif“the“ rst“comp˜onen�¸ãt“is“a“ lled“outline“or“a“pieceŽ¡�‘Gof–.Lt�¸ãypšGeset“text.‘dÄThe“Êclipped“Äand“Êbounded“Äop˜erators“test“whether“the“argumenš¸ãt“is“a“kno˜wn“pictureŽ¡�‘Gthat–R–starts“with“a“clipping“path“or“a“Êsetbounds“Äpath.‘pÝThis“is“true“if“the“ rst“compšGonen�¸ãt“is“clipp˜edŽ¡�‘Gor–UUb�Gounded“or“if“the“en�¸ãtire“picture“is“enclosed“in“a“clipping“or“Êsetbounds“Äpath.ަ�‘!GThere–Qare“also“n�¸ãumerous“part“extraction“opšGerators“that“test“the“ rst“comp˜onen�¸ãt“of“a“picture.‘pVIfŽ¡�‘GÊp–¦EÄis“a“picture“and“Êstroked›?ýp“Äis“true,‘º�Êpathpart˜p“Äis“the“path“describing“the“line“that“got“strok�¸ãed,Ž¡�‘GÊpenpart›?ýp–UUÄis“the“p�Gen“that“w�¸ãas“used,“Êdashpart˜p“Äis“the“dash“pattern,“and“the“color“isޤ��’Œ`ÙÊ(redpart–?ýp,“greenpart“p,“bluepart“p)ŽŽ¡�‘GÄIf–UUthe“line“is“not“dashed,“Êdashpart‘?ýp“Äreturns“an“empt�¸ãy“picture.ަ�‘!GThe–dsame“part“extraction“op�Gerators“w�¸ãork“when“Êfilled›?ýp“Äis“true,‘§«except“that“Êdashpart˜p“Äisޤ �‘Gnot–î meaningful“in“that“case.‘;çF‘ÿ*ªor“text“comp�Gonen�¸ãts,›7Êtextual‘?ýp“Äis“true,˜Êtextpart‘?ýp“Ägiv�¸ães“the“textŽ¡�‘Gthat–òúgot“tš¸ãyp�Geset,‘ZbÊfontpart‘?ýp“Ägiv˜es“the“fon˜t“that“w˜as“used,›Zband“Êxpart–?ýpÄ,˜Êypart“pÄ,˜Êxxpart“pÄ,Ž¡�‘GÊxypart–?ýpÄ,›˜¬Êyxpart“pÄ,˜Êyypart“p–i�Ätell“ho�¸ãw“the“text“has“b�Geen“shifted,˜rotated,˜and“scaled.‘#,The“ÊredpartÄ,Ž¡�‘GÊgreenpartÄ,–UUand“Êbluepart“ÄopšGerators“also“w�¸ãork“for“text“comp˜onen�¸ãts.ަ�‘!GWhen–«fÊclipped›?ýp“Äor“Êbounded˜p“Äis“true,‘ÀëÊpathpart˜p“Ägiv�¸ães“the“clipping“or“Êsetbounds“Äpath“andŽ¡�‘Gthe–ìØother“part“extraction“op�Gerators“are“not“meaningful.‘8PSuc�¸ãh“non-meaningful“part“extractions“doŽ¡�‘Gnot–Mngenerate“errors|they“return“n�¸ãull“v‘ÿqÇalues“instead:‘mÔthe“trivial“path“Ê(0,0)“Äfor“ÊpathpartÄ,‘OÊnullpenŽ¡�‘GÄfor–RAÊpenpartÄ,›RÞan“empt�¸ãy“picture“for“ÊdashpartÄ,˜zero“for“ÊredpartÄ,˜ÊgreenpartÄ,˜ÊbluepartÄ,˜and“the“n�¸ãullŽ¡�‘Gstring–UUfor“Êtextpart“Äor“ÊfontpartÄ.ަ�‘!GOne–UU nal“op�Gerator“for“extracting“information“from“a“picture“isޤ��’³9ŠÊlengthŽ�’ÖÍÆh�Äpicture‘UUprimaryŽ‘D±ÑÆiŽŽ¡�‘GÄThis–UUreturns“the“n•¸ãum“bšGer–UUof“comp˜onenš¸ãts“that“a“Êfor��Å:–ª¨:“:ŽŽ‘ UOÊwithin“Äiteration“w˜ould“ nd.ŽŽŸŽŒ‹¸ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ19ŽŽ �¿°� ý•@P��‘GÛB.3Ž‘3ª+Other–€New“F‘þàeaturesŽŸuT�‘GÄThe–êÛÊmarith.mp“Äand“Êsarith.mp“Äpacš¸ãk‘ÿqÇages“use“n˜um˜b�Gers“of“magnitude“4096“more.‘NISince“suc˜h“n˜um˜b�Gersޤ �‘Gcan–Ecause“o•¸ãv“er o“w–Eproblems“in“MetaP�¸ãost's“linear“equation“solving“and“path“ tting“algorithms,‘¯theyŽ¡�‘Gare–`Ùnormally“allo•¸ãw“ed–`Ùonly“as“inš¸ãtermediate“results.‘”TThis“limitation“is“remo˜v˜ed“when“the“in˜ternalŽ¡�‘Gv‘ÿqÇariable–@îÊwarningcheck“Äis“zero.‘júIn“earlier“vš¸ãersions“of“MetaP˜ost,‘Ethe“limitation“could“b�Ge“remo˜v˜ed“forŽ¡�‘Gv‘ÿqÇariables–UUbut“explicit“constanš¸ãts“w˜ere“alw˜a˜ys“restricted“to“b�Ge“less“than“4096.Ž©�‘!GF‘ÿ*ªor–Ñùcompleteness,‘1"wš¸ãe“also“men˜tion“one“other“new“feature“of“MetaP˜ost“V‘ÿ*ªersion“0.60.‘ç´WhenŽ¡�‘GT�‘þU>Ÿ'EŽ‘ãxX–¨|material“is“included“in“a“picture“via“the“Êbtex��Å:–ª¨:“:ŽŽ‘ UOÊetex“Äfeature,‘½Fthe“thicš¸ãkness“of“horizon˜tal“andŽ¡�‘Gvš¸ãertical–Jírules“gets“rounded“to“exactly“the“righ˜t“n˜um˜b�Ger“of“pixels;‘Nei.e.,‘Min˜terpreting“MetaP˜ost“outputŽ¡�‘Gaccording– to“the“Pš¸ãostScript��Ÿû±È���‘�þž²×«RŽŽŽ���µ ŽŽŽŽŽ‘ úîÄscan“con˜v˜ersion“rules“[�7Ž‘]“mak˜es“the“pixel“width“equal“to“the“ceilingŽ¡�‘Gof–Oˆthe“unrounded“width.›`_In“fact,‘Ža“similar“relationship“holds“for“all“line“widths.˜The“generatedŽ¡�‘GPš¸ãostScript–UUsets“line“widths“b˜y“ rst“transforming“to“device“co�Gordinates“and“rounding“appropriately‘ÿ*ª.ަ�‘GA�¸ãtts.Ž¡�‘GReferencesŽŽŸŽŒ‹ÈÆ ž¿°� ýT@P��‘GÈDraš¸ãwing–UUGraphs“with“MetaP˜ost’©QÄ20ŽŽ �¿°� ý•@P�‘GâReferencesŽŸç���‘HÄ[1]ŽŽ‘&ŸƒJon–éL.“Benš¸ãtley“and“Brian“W.“Kernighan.‘&þGrap|a“language“for“t˜yp�Gesetting“graphs.‘&þIn“ÇUnixޤ �‘&ŸƒR–ÿ}'ese“ar“ch– )System“Pap‘ÿ}'ersÄ,‘ð¯v�¸ãolume–׆IšGI,“pages“109{146.“A‘ÿ*ªT&T‘×fBell“Lab˜oratories,›ð¯Murra�¸ãy“Hill,˜NewŽ¡�‘&ŸƒJersey‘ÿ*ª,–UUten�¸ãth“edition,“1990.Ž©���‘H[2]ŽŽ‘&ŸƒWilliam–ùƒS.“Clev�¸ãeland.›X1ÇThe–*òElements“of“Gr‘ÿ}'aphing“DataÄ.˜Hobart›ùƒPress,–"ŽSummit,“New˜Jersey‘ÿ*ª,Ž¡�‘&Ÿƒ1985.ަ���‘H[3]ŽŽ‘&ŸƒWilliam–ï²S.“Clevš¸ãeland.‘ 5ÓA‘ïHmo�Gdel“for“studying“displa˜y“metho�Gds“of“statistical“graphics“(withŽ¡�‘&Ÿƒdiscussion).‘nïÇJournal–“çof“Computational“and“Statistic›ÿ}'al“Gr˜aphicsÄ,–UU3,“to“app�Gear.ަ���‘H[4]ŽŽ‘&ŸƒWilliam–UUS.“Clev�¸ãeland.–nïÇVisualizing‘“çDataÄ.“Hobart–UUPress,“Summit,“New“Jersey‘ÿ*ª,“to“app�Gear.ަ���‘H[5]ŽŽ‘&ŸƒJ.–4rD.“Hobbš¸ãy‘ÿ*ª.‘ÑA‘48user's“man˜ual“for“MetaP˜ost.‘ÑComputing“Science“T‘ÿ*ªec˜hnical“Rep�Gort“no.“162,Ž¡�‘&ŸƒA‘ÿ*ªT&T‘Bell–DLab�Goratories,›@@Murra�¸ãy“Hill,˜New“Jersey‘ÿ*ª,˜April“1992.‘žûCan“b�Ge“obtained“b�¸ãy“mailingŽ¡�‘&Ÿƒ\Êsend–?ý162“from“research/cstrÄ"–UUto“Ênetlib@research.att.comÄ.ަ���‘H[6]ŽŽ‘&ŸƒJohn–'%D.“Hobb•¸ãy‘ÿ*ª.›]ÙIn“tro�Gduction–'%to“MetaP�¸ãost.˜In“ÇEur–ÿ}'oT�‘þKß'EŽ‘Í-X‘i^'92‘iiPr“o“c“e“e“dingsÄ,–0bpages‘'%21{36,“Septem-Ž¡�‘&Ÿƒb�Ger‘UU1992.ަ���‘H[7]ŽŽ‘&ŸƒAdob�Ge–o¶Systems“Inc.‘½‹ÇPostScript–¬,L›ÿ}'anguage“R˜efer˜enc˜e“ManualÄ.‘½‹Addison‘o¶W–ÿ*ªesley“,–vNReading,“Mass-Ž¡�‘&Ÿƒac•¸ãh“usetts,–UUsecond“edition,“1990.ަ���‘H[8]ŽŽ‘&ŸƒD.–;’E.“Kn�¸ãuth.›³óMÈØ 0 logosl10ëMMET�ÇAF�Ž9ONT‘�mÇthe‘�°Pr–ÿ}'o“gr“amÄ.˜Addison‘;’W–ÿ*ªesley“,–sìReading,“Massac•¸ãh“usetts,‘sì1986.˜V‘ÿ*ªolumeŽ¡�‘&ŸƒD–UUof“ÇComputers–“çand“T‘ÿ;¼yp‘ÿ}'esettingÄ.ަ���‘H[9]ŽŽ‘&ŸƒLeslie‘ÐLamp�Gort.‘mòL�‘üffŸþµUëLaŽ‘‹ÄT�‘þU>ŸŒEŽ‘ãxXÇ:–1ªA‘1�Do›ÿ}'cument“Pr˜ep˜ar˜ation“SystemÄ.‘mòAddison‘ÐW–ÿ*ªesley“,–+®Reading,“Massa-Ž¡�‘&Ÿƒc•¸ãh“usetts,‘UU1986.ަ���‘G[10]ŽŽ‘&ŸƒU.S.– *Bureau“of“the“Census.‘S ÇStatistic–ÿ}'al›NÀA�¾“bstr“acts˜of˜the˜Unite“d˜States:‘w1992Ä.‘S W‘ÿ*ªashington,‘3D.C.,Ž¡�‘&Ÿƒ112th–UUedition,“1992.ަ���‘G[11]ŽŽ‘&ŸƒEdw�¸ãard–´R.“T‘ÿ*ªufte.› §ÇVisual–0hDisplay“of“Quantitative“InformationÄ.˜Graphics–´Press,‘…ËBo�¸ãx“430,Ž¡�‘&ŸƒCheshire,–UUConnecticut“06410,“1983.ŽŽŸŽŒ‹Îò ž¿°� ýT@P �¿°� ý•@P�‘vŽhâDrašŠ=wing–…Graphs“with“MetaP˜ostŽŸ �’Ê$÷ÇJohn–“çD.“HobbyŽŸ�’µdÄA‘ÿ*ªT&T–UUBell“Lab�Goratoriesޤ �’ªy}Murra�¸ãy–UUHill,“NJ‘ 07974-2070ŽŸ"�’ÎÜkÇABSTRA�¾“CTŽŸ�‘GÄThis–ÿ"papšGer“describ˜es“a“graph-draš¸ãwing“pac˜k‘ÿqÇage“that“has“b�Geen“implemen˜ted“as“an“extension“to“theŽ¡�‘GMetaPš¸ãost–gÄgraphics“language.‘©MetaP˜ost“has“a“p�Go˜w˜erful“macro“facilit˜y“for“implemen˜ting“suc˜h“exten-Ž¡�‘Gsions.›jYThere–? are“also“some“new“language“features“that“supp�Gort“the“graph“macros.˜Existing“featuresŽ¡�‘Gfor–rËgenerating“and“manipulating“pictures“alloš¸ãw“the“user“to“do“things“that“w˜ould“b�Ge“dicult“to“ac˜hiev˜eŽ¡�‘Gin–UUa“stand-alone“graph“pac�¸ãk‘ÿqÇage.ŽŽŸŽŒøØ„ƒ’À;èž¿°ïÿ óMÈØ 0 logosl10óLŒ-ø cmcsc10óKßCÊscmtt8óJè=logo8óIÈØ 0 logo10ó7ò"Vff cmbx10ó0ÂÖN  cmbx12óßê cmmi10óKñ`y cmr10ó¾KÈ cmsy8ó |{Ycmr8ó O!â…cmsy7ó 0e—rcmmi7óÙ“ Rcmr7ó¹Aa¨cmr6ó°Ü0ncmsy5ó†›Zcmr5ùÛ‘ßßßß