RE: PlotVectorField

*To*: mathgroup at smc.vnet.net*Subject*: [mg34791] RE: [mg34785] PlotVectorField*From*: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>*Date*: Fri, 7 Jun 2002 01:08:53 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

> -----Original Message----- > From: shollis at armstrong.edu [mailto:shollis at armstrong.edu] To: mathgroup at smc.vnet.net > Sent: Thursday, June 06, 2002 7:55 AM > Subject: [mg34791] [mg34785] PlotVectorField > > > I have a situation where I need to PlotVectorField with a specific > PlotRange. For example, > > <<Graphics`PlotField`; > PlotVectorField[{1,4-x^2-y^2},{x,-3,3},{y,-3, 3}, > ScaleFunction->(1&), PlotPoints -> 9, ScaleFactor -> 0.75, > PlotRange->{{-3.2, 3.2},{-3.2, 3.2}}] > > As happens with that example, arrows near the edge often get chopped > off. That's to be expected. What I'd like to do is use PlotRegion to > create ``margins" around the plot so that all the arrows are fully > visible. For example, > > PlotVectorField[{1,4-x^2-y^2},{x,-3,3},{y,-3, 3}, > ScaleFunction->(1&), PlotPoints -> 9, ScaleFactor -> 0.75, > PlotRange->{{-3.2, 3.2},{-3.2, 3.2}}, PlotRegion->{{.1,.9},{.1,.9}}] > > This brings the heads of the arrows back into the picture, but the > lines don't connect with the heads. In other instances, heads get > drawn badly and look like boxes. > > Short of changing the PlotRange, xmin, xmax, ymin, ymax values, is > there some better way to do this? > > And is this an ``issue" with PlotVectorField? > > Thanks in advance, > > Selwyn > Selwyn, if you generate your Graphics object as p0 = PlotVectorField[{1, 4 - x^2 - y^2}, {x, -3, 3}, {y, -3, 3}, ScaleFunction -> (1 &), PlotPoints -> 9, ScaleFactor -> 0.75, PlotRange -> {{-3.2, 3.2}, {-3.2, 3.2}}] then you'll get intact arrows if you get rid off all options: Show[Graphics[p0[[1]]], AspectRatio -> Automatic, Background -> Hue[.1, .1, 1], Frame -> True] It appears as if in p0 Arrows were partially hidden by the labelling of the FrameTicks, even if FrameTicks -> None or Frame -> False. There may be more subtle ways to suppress the undesired effects, but this will take some time playing with the options. -- Hartmut