More quiver questions

Hi Folks,

It looks like quiver might be able to what I want.

However, I have a few more questions. Assume the form
QUIVER( X, Y, U, V, S)
1)
I see from the on-line documentation that:

"color can be an array of colors in which case the arrows can be
colored according to another dataset."

What is an array of colors? I want to make vectors one color if an element of U is negative and another color if it is zero or positive.

2)
I want to make several plots, i.e a series of png or ps files, and have a vector with magnitude N be the same size on each plot. Is this what setting S equal to zero is supposed to accomplish?

···

--
Ms. Carol A. Leger
SRI International Phone: (650) 859-4114
333 Ravenswood Avenue G-273
Menlo Park, CA 94025 e-mail: leger@...392...

Hi Carol,

For the first question, you could do something like
quiver(x,y,u,v,color = (v>0)*1.)
which would draw the arrows with positive v to the color corresponding
to index 1 in the colormap, and the arrows with negative v to the
color corresponding to 0. For the jet colormap, these are red and blue
respectively.

If you don't like red and blue, you could change the colors by
changing the colormap.

I tried using the "color array" to tell explicitely quiver what color
to use but I haven't been able to work it out.

Cheers,

David

2006/3/15, Carol Leger <carol.leger@...392...>:

···

Hi Folks,

It looks like quiver might be able to what I want.

However, I have a few more questions. Assume the form
QUIVER( X, Y, U, V, S)
1)
I see from the on-line documentation that:

"color can be an array of colors in which case the arrows can be
colored according to another dataset."

What is an array of colors? I want to make vectors one color if an
element of U is negative and another color if it is zero or positive.

2)
I want to make several plots, i.e a series of png or ps files, and have
a vector with magnitude N be the same size on each plot. Is this what
setting S equal to zero is supposed to accomplish?

--
Ms. Carol A. Leger
SRI International Phone: (650) 859-4114
333 Ravenswood Avenue G-273
Menlo Park, CA 94025 e-mail: leger@...392...

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options