{VERSION 2 3 "IBM INTEL NT" "2.3" } {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 30 " Pl otting a sequence of points" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 481 "Suppose you want to produce a plot by generati ng points one at a time, and plotting them. In a typical programming \+ language such as C, you would probably build up the plot one point at \+ a time, plotting each point as it is generated. This is not the way M aple works, however. In Maple a plot is a single object, whose image on the screen or in a file is \"printed\" as the result of one comman d (although this may use the results of several different plot command s, combined with " }{MPLTEXT 0 21 7 "display" }{TEXT -1 4 "). " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 187 "To plot \+ a sequence of points, you build up a list or array of points and then \+ plot it. In the case of a large number of points, an array can be mor e efficient. It is also faster to use " }{MPLTEXT 0 21 9 "pointplot" }{TEXT -1 8 " in the " }{MPLTEXT 0 21 5 "plots" }{TEXT -1 21 " package rather than " }{MPLTEXT 0 21 4 "plot" }{TEXT -1 10 " with the " } {MPLTEXT 0 21 11 "style=POINT" }{TEXT -1 124 " option. This procedure can handle an array directly, without converting it to a list of list s (which would be required by " }{MPLTEXT 0 21 4 "plot" }{TEXT -1 56 " ). Similarly, for a three-dimensional plot you can use " }{MPLTEXT 0 21 11 "pointplot3d" }{TEXT -1 8 " in the " }{MPLTEXT 0 21 5 "plots" } {TEXT -1 26 " package.\n\nUse the option " }{MPLTEXT 0 21 12 "symbol=P OINT" }{TEXT -1 87 " when plotting points to make each point be a sing le dot. The other possibilities are " }{MPLTEXT 0 21 3 "BOX" }{TEXT -1 3 ", " }{MPLTEXT 0 21 6 "CIRCLE" }{TEXT -1 2 ", " }{MPLTEXT 0 21 5 "CROSS" }{TEXT -1 28 " (which is the default) and " }{MPLTEXT 0 21 7 "DIAMOND" }{TEXT -1 3 ". \027" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT 26 8 "Example:" }}{PARA 0 "" 0 "" {TEXT -1 239 "Here we generate a plot o f 4000 successive points of the H\351non map . To take maximum advant age of the speed of hardware floating-point arithmetic, we write a pro cedure to compute the points and put them in an array, and evaluate it using " }{MPLTEXT 0 21 6 "evalhf" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 229 "makearray:= proc(L) \nlocal i, x, y, xp; \nx := 0.6; y := 0.2; \nfor i to 400 do\n xp := 1+y-1.4*x^2;\n y := .3* x;\n x := xp;\nod;\nfor i to 4000 do \n xp := 1+y-1.4*x^2;\n y := .3*x;\n x := xp; \n L[i,1]:= x; L[i,2]:= y;\nod; \nend:" }}}{PARA 0 "" 0 "" {TEXT -1 77 "We construct the array, and pass it \"by refere nce\" to the procedure with the " }{MPLTEXT 0 21 3 "var" }{TEXT -1 50 " construction so that the procedure can modify it." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "L:= array(1..4000,1..2):\nevalhf(makearray( var(L))):" }}}{PARA 0 "" 0 "" {TEXT -1 11 "Now we use " }{MPLTEXT 0 21 9 "pointplot" }{TEXT -1 29 " to plot the array of points." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "plots[pointplot](L,symbol=PO INT);" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT 26 9 "See also:" }}{PARA 0 " " 0 "" {HYPERLNK 17 "evalhf" 2 "evalhf" "" }{TEXT -1 2 ", " } {HYPERLNK 17 "evalhf(array)" 2 "evalhf,array" "" }{TEXT -1 2 ", " } {HYPERLNK 17 "evalhf(var)" 2 "evalhf,var" "" }{TEXT -1 2 ", " } {HYPERLNK 17 "plot" 2 "plot" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "plot(o ptions)" 2 "plot,options" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "pointplot " 2 "pointplot" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "pointplot3d" 2 "poi ntplot3d" "" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 24 "Maple Advisor Dat abase, " }{TEXT -1 15 " R. Israel 1998" }}}}{MARK "0 4 5" 0 } {VIEWOPTS 1 1 0 1 1 1803 }