I have a matrix of complex numbers for the electric field inside a medium. Since I want to draw the quiver plot of these elements, it will be completely different if I only use the absolute part. Then if I take only real or imaginary parts, the configuration of the field will change?
-
Complex electric field doesn't make sense unless we are talking about EM waves. Is that what you are dealing with here? – acarturk Dec 02 '19 at 10:10
-
Yes, I'm talking about EM waves. Actually, I have the two components of complex valued electric field (E_x and E_y), and I need to plot the polarisation distribution as a quiver plot. Since quiver plot can't take complex numbers as its input, I am stuck. – Yatish Chandra Dec 02 '19 at 14:36
3 Answers
The field configuration is provided by your complex data. The way you plot them does not change di field configuration but it may provide a more or less faithful visual representation of your data.
I assume that you really need the information contained in the complex field (are you sure that the physical quantity you are interested is not separately the real and imaginary part of it?).
Quiver plots of a scalar complex field use two-dimensional arrows to encode the value of real and imaginary part of the field at each point as two orthogonal components of that arrow. In the case of a complex vector field there is the problem representing two or three vector component, each with real and imaginary values. Here, I do not know if there is an established tradition. I would use a color code, visualizing each cartesian component as a 2D arrow of a different color.
-
I think a clearer plot would be two colors, one for the real, and one for the imaginary. – garyp Dec 02 '19 at 11:28
-
@garyp I agree. In any case, some convention has to be found and the resulting plot requires some interpretation. – GiorgioP-DoomsdayClockIsAt-90 Dec 02 '19 at 13:12
-
Here, I don't want the quiver plot with real and imaginary parts for a complex electric field as its input. Actually, I have the two components of the complex-valued electric field (E_x and E_y), and I need to plot the polarisation distribution as a quiver plot. Since quiver plot can't take complex numbers as its input, I am stuck. – Yatish Chandra Dec 02 '19 at 14:39
-
I think what GiorgioP suggested in the last sentence was to overlap two quiver plots, one with the real parts and one with the imaginary parts, i.e. quiver 1: [Re(Ex),Re(Ey)] in blue, and quiver 2: [Im(Ex),Im(Ey)] in red]. Also you can first try to see if adding a given phase to all the values could minimize one of the parts (real or imag) so that the information is less spread between the two, and thus more easily understandable. – EigenDavid Dec 02 '19 at 14:42
As a second idea, you could do a absolute value quiver plot on top of a phase angle quiver plot with $\arg E_x$ on $x$ axis and $\arg E_y$ on $y$ axis, just like the real part in blue, imaginary part in red plot in the above suggestions. But I guess this plot will be more informative in that phase and magnitude are more physical than real or imaginary parts.
TL;DR: Just do as David says, but with quiver 1: [abs(Ex),abs(Ey)] in blue, quiver 1: [angle(Ex),angle(Ey)] in red.

- 1,112
If your problem, as you described it in a comment is that
Actually, I have the two components of complex valued electric field (E_x and E_y), and I need to plot the polarisation distribution as a quiver plot.
then you shouldn't use a quiver plot $-$ you have a field of elliptically-polarized EM waves, and to represent that polarization distribution you should use an ellipse plot. To do this, at each point $\mathbf r$ with complex polarization vector $\mathbf E(\mathbf r)$ you draw the polarization ellipse corresponding to $\mathbf E(\mathbf r)$, which is the path followed by the real electric field over time, namely $$ \mathbf E_\mathrm{real}(\mathbf r,t) = \mathrm{Re}\mathopen{}\left[\mathbf E(\mathbf r)e^{-i\omega t}\right], $$ as $\omega t$ covers the interval $[0,2\pi]$. This ellipse obviously shown displaced so that its center is over $\mathbf r$.
Depending on the situation, you may want to normalize the ellipses (by dividing by the square root of the field intensity, or by the major axis of the ellipse (which you can find using the method I described here), and plotting the intensity separately, in the name of adding clarity.

- 132,859
- 33
- 351
- 666