Mathematica Graphics Primitives
- To: mathgroup at smc.vnet.net
- Subject: [mg41283] Mathematica Graphics Primitives
- From: jprusa <jprusa at bellsouth.net>
- Date: Tue, 13 May 2003 04:17:57 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello: I am interested in plotting vectors, and have tried the code suggested in the Mathematica 4 Standard Add-on Packages GuideBook (section 6, Graphics): << Graphics`Arrow` Show[Graphics[ Table[Arrow[{0, 0}, x {Sin[x], Cos[x]} HeadScaling -> Absolute], {x, 0, 2* Pi, .3}]], PlotRange -> All] and it doesn't work! Instead of getting the nice series of vectors shown on the bottom of p. 135, I get: From In[59]:= Graphics::gprim: \ Arrow[{0,0}, {<<1>>} -> Absolute] was \ encountered where a Graphics primitive or directive was expected. From In[59]:= Graphics::gprim: Arrow[{0,0}, {<<1>>} -> Absolute] \ was encountered where a Graphics primitive or directive was expected. From In[59]:= Graphics::gprim: Arrow[{0,0}, {<<1>>} ] was \ encountered where a Graphics primitive or directive was expected. From In[59]:= General::stop: Further output of Graphics::gprim will be suppressed during \ this calculation. Then it attempts to draw a box, but inside the box is the message: PostScript Graphics The PostScript text in this cell did not contains any drawing commands, or contained an error before the first valid drawing command. An attempt to past the box directly onto this email yields commands: From In[59]:= GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.952381 0.0147151 0.588604 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath % End of Graphics MathPictureEnd \ \>"] I have tried several permutations, including removing the HeadScaling argument (sometimes it complained about the HeadScaling), replacing Pi with N[Pi], replacing the left hand point of the x interval with 0.3 (sometimes it complained about the vector length). I've even tried a single vector with no options: Show[Graphics[Arrow[{0, 0}, {1, 1}]]] but this also doesn't work, giving the error message: Graphics::gprim: Arrow[ {0, 0},{1, 1}] was \ encountered where a Graphics primitive or directive was expected. followed by error PostScript Graphics Box as above for GuideBook's example. Any help would be greatly appreciated. Sincerely, Joe Prusa ps: I am running V. 4.1.5.0 on a Macintosh dual G4, OS 10.2.5, with plenty of memory and disk space.