{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 }{CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 }{CSTYLE "Help H eading" -1 26 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 0 {PARA 0 "" 0 "" {TEXT 26 7 "Advice:" }{TEXT -1 23 " Pl otting in procedures" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 263 "The various \"plotting\" commands do not actually plot anything. Instead, they return a plot structure, and the actual plot is produced when that plot structure is \"printed\". This is what al lows you to produce several plots and then combine them (typically usi ng " }{MPLTEXT 0 21 7 "display" }{TEXT -1 334 ") into one plot, withou t seeing the individual plots. Normally, when the plotting command is ended by a semicolon, the result of the command is \"printed\" and yo u see the plot. However, if the command is placed inside a procedure, and the result of the command is not the last result in the procedure , it will not be printed (unless " }{MPLTEXT 0 21 10 "printlevel" } {TEXT -1 48 " is at least 5). The simplest remedy is to use " } {MPLTEXT 0 21 5 "print" }{TEXT -1 34 " to explicitly print the result. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 261 "A \+ typical case where this arises is in writing a procedure to produce a \+ plot file (in one of the formats that Maple supports, such as jpeg or \+ PostScript. The same principles apply, whether the plot is sent to th e screen or a file. So instead of something like" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "myproc:= proc()\n plotsetup(ps, plotoutpu t=myfile);\n plot(...);\n plotsetup(inline);\nend;" }}}{PARA 0 "" 0 "" {TEXT -1 14 "you should use" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 106 "myproc:= proc()\n plotsetup(ps, plotoutput=myfil e);\n print(plot(...));\n plotsetup(inline);\nend;" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT 26 9 "See also:" }}{PARA 0 "" 0 "" {HYPERLNK 17 "plot" 2 "plot" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "print" 2 "print " "" }{TEXT -1 2 ", " }{HYPERLNK 17 "printlevel" 2 "printlevel" "" }}} {SECT 0 {PARA 0 "" 0 "" {TEXT 26 24 "Maple Advisor Database, " }{TEXT -1 15 " R. Israel 1998" }}}}{MARK "2 0 1" 15 }{VIEWOPTS 1 1 0 1 1 1803 }