MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Show two vector fields with different arrow colors

With DrawGraphics it's easy.


    {Red, DrawVectorField[{y, -x}, {x, 0, 1}, {y, 0, 1}],
      Green, DrawVectorField[{x, y}, {x, 0, 1}, {y, 0, 1}]},
    AspectRatio -> Automatic,
    Background -> Linen,
    ImageSize -> 450];

David Park
djmp at

From: Niels L. Ellegaard [mailto:gnalle at]
To: mathgroup at

Dear Masters

I would like to plot two vector fields in the same graph. However I
need the arrows of the two fields to have different colors. Is there a
sneaky way to do this? I tried the following, but in the third plot
all arrows become red.

p1 :=  PlotVectorField[{y,-x},{x,0,1},{y,0,1}, DefaultColor -> RGBColor[1,
0, 0]];
p2 :=  PlotVectorField[{x,y},{x,0,1},{y,0,1}, DefaultColor -> RGBColor[0, 1,
0]] ;

                Thanks in advance


PS: I am using a slightly old version, so I cannot apply PlotVectorField to
a list

In[53]:= $Version

Out[53]= Silicon Graphics 3.0 (September 16, 1997)

  • Prev by Date: How to get an answer as a Root object?
  • Next by Date: Re: Re: Beginner : how to convert .bmp or .jpeg for digital processing
  • Previous by thread: Re: How to get an answer as a Root object?
  • Next by thread: Errors from FindFit