plot polarization map (like ZEMAX)

Hello,

I would like to plot the polarization state of a two-dimensional vector field (linear, circular or generally elliptic), similarly to that seen on this ZEMAX plot:
http://www.zemax.com/UserFiles/Image/UI/pol_pupil.gif

It looks like some kind of enhanced quiver plot: a small line with arrows at both ends points out the local direction of linear polarization, while a directed ellipse with a given orientation of its axes depicts local elliptical polarization state (which becomes a circle for circular polarization).

I am a novice matplotlib user, please give me some advice on how to start with implementing such a plot (what to read, API examples to look at etc.)

Thanks,

Kornel JAHN

Hmm, interesting idea. quiver.py is certainly the right place to start, but I think there is one key missing feature in matplotlib: I haven’t a clue how one would draw a arrow in an ellipse shape.

As far as I know, such an arrow style isn’t possible. What you could do instead is to create a new class that is based on the ellipse collection instead of the Quiver class. Once you get just basic ellipses drawn, then maybe you can add some lines to the ellipses to indicate the direction of spin, much like how the barbs are drawn in the Barbs class.

I hope this is helpful.

Ben Root

···

On Sun, Nov 14, 2010 at 5:17 PM, Kornél Jahn <kjahn.public@…287…> wrote:

Hello,
I would like to plot the polarization state of a two-dimensional vector field (linear, circular or generally elliptic), similarly to that seen on this ZEMAX plot:
http://www.zemax.com/UserFiles/Image/UI/pol_pupil.gif

It looks like some kind of enhanced quiver plot: a small line with arrows at both ends points out the local direction of linear polarization, while a directed ellipse with a given orientation of its axes depicts local elliptical polarization state (which becomes a circle for circular polarization).

I am a novice matplotlib user, please give me some advice on how to start with implementing such a plot (what to read, API examples to look at etc.)

Thanks,

Kornel JAHN