RE: AddArrow
- To: mathgroup at smc.vnet.net
- Subject: [mg38211] RE: [mg38139] AddArrow
- From: David Turner <dturner at faulkner.edu>
- Date: Thu, 5 Dec 2002 03:31:08 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Gangadhara, The following code works for Mathematica 3.0.1, 4.0, 4.1.2, and 4.2 under Windows 98: Needs["ExtendGraphics`FieldLines`"]; ex=-y[t]; ey=x[t]; x0=1.0; y0=1.0; t1=6; lines = FieldLine[ {x[t], ex, x0}, {y[t], ey, y0}, {t, t1}]; c = Show[Graphics[lines], AspectRatio -> Automatic, Frame -> True]; arrows = AddArrow[lines, 0.5]; a = Show[Graphics[{lines,arrows}], AspectRatio -> Automatic, Frame -> True]; Regards, David ----Original Message----- From: Gangadhara [mailto:ganga at iiap.ernet.in] To: mathgroup at smc.vnet.net Subject: [mg38211] [mg38139] AddArrow Dear MathGroup I have a problem in using AddArrow given in FieldLines.m I have the task of plotting dipole magnetic field lines in 3D spherical coordinate system. Before I actually start with my work, I was trying learn with the following simple code: ex=-y[t]; ey=x[t]; x0=1.0; y0=1.0; t1=6; lines = FieldLine[ {x[t], ex, x0}, {y[t], ey, y0}, {t, t1}]; c=Show[Graphics[lines, AspectRatio -> Automatic, Frame -> True]]; a=Show[AddArrow[lines, 0.5]]; In these command lines, c plots contour plot. But a gives the following message: Show::gcomb: An error was encountered in combining the graphics objects in Show[{Arrow[{0.570594, 1.29399}, <<3>>, HeadLength -> 4], <<4>>}]. If any knows the solution to this problem please let me know. I use Mathematica 4.0 for Linux. Thanking you. best regards Gangadhara -- ___________________________________________________________________________ R. T. Gangadhara E-mail : ganga at iiap.ernet.in Indian Institute of Astrophysics Fax :91-80-5534043 Bangalore - 560034, India http://www.iiap.ernet.in/personnel/ganga/ganga.html Tel.:91-80-5530672 (Operator), 5539251 Ext 291 (Direct) __________________________________________________________________________