function polarization_plot(E_x0, E_y0, phi_x, phi_y)
% Assume plane waves traveling in the -z direction
% E_x0, E_y0 : Magnitude of the x, y components, respectively
% phi_x, phi_y : Phase of the x, y components
omega = 2*pi ;
dt = 1e-11 ;
t = linspace(0,3,300) ;
beta = omega/3e8 ;
Ex = E_x0 * cos(omega*t + phi_x) ;
Ey = E_y0 * cos(omega*t + phi_y) ;
plot3(t, Ex, Ey) ;
set(gca,'ydir','reverse') ;
xlabel('t') ;
ylabel('E_x') ;
zlabel('E_y') ;
axis equal ;
grid on ;
hold on ;
plot(t, Ex, 'r') ;
zvec = zeros(1, length(Ey)) ;
plot3(t, zvec, Ey, 'g') ;
hold off ;