clear;

%
% Sinusoids
%
t= 0 : pi/40 :3*pi;
hold off
plot3(t, zeros(1,121), sin(t), 'black-', 'LineWidth', 1)
hold on
plot3(t, sin(t), zeros(1,121), 'black-', 'LineWidth', 1)

%
% set Coordinate
%
% axis equal
axis off
set(gca, 'dataaspectratio', [11/3 1 1])
view ([-30,320])
axis([0 11 -1.5 1.5 -1.5 1.5]);

%
% axes 
%
arrow([0 0 0],[11 0 0],10,...
  'TipAngle', 25,...
  'BaseAngle',90,...
  'CrossDir', [0 1 0],...
  'LineWidth', 1);
arrow([0 0 0],[0 1.5 0],10,...
  'TipAngle', 25,...
  'BaseAngle',90,...
  'CrossDir', [1 0 0],...
  'LineWidth', 1);
arrow([0 0 0],[0 0 1.5],10,...
  'TipAngle', 25,...
  'BaseAngle',90,...
  'CrossDir', [1 0 0],...
  'LineWidth', 1);

text(0, 0.5, 1.8, 'x',...
  'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')
text(-0.3, 1.6, 0.5, 'y',...
  'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')
text(10, 0.3, -0.1, 'z',...
  'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')

%
% bars
%
xs = [0:pi/10:3*pi; 0:pi/10:3*pi];
ts = [zeros(1,31);sin(0:pi/10:3*pi)];
zs = zeros(2,31);
H=line(xs, ts, zs);
set(H, 'Color', 'black', 'LineWidth', 0.6);
H=line(xs, zs, ts);
set(H, 'Color', 'black', 'LineWidth', 0.6);

%
% E & B
%
arrow([0.5*pi 0 0],[0.5*pi 0 1],8,...
  'TipAngle', 25,...
  'BaseAngle',90,...
  'CrossDir', [1 0 0],...
  'LineWidth', 1.5);

arrow([0.5*pi 0 0],[0.5*pi 1 0],8,...
  'TipAngle', 25,...
  'BaseAngle',90,...
  'CrossDir', [1 0 0],...
  'LineWidth', 1.5);

text(0.5*pi, 0, 1.2, 'E', 'FontWeight', 'bold',...
  'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')

text(0.5*pi, 1.3, 0, 'H', 'FontWeight', 'bold',...
  'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')

text(3.2*pi, -0.4, 0, 'E   H', 'HorizontalAlign', 'center',...
  'FontWeight', 'bold', 'fontangle', 'italic', 'fontsize', 14,...
  'FontName', 'Times-Roman')
text(3.2*pi, -0.4, 0, '\times', 'HorizontalAlign', 'center',...
  'FontWeight', 'normal', 'fontangle', 'normal', 'fontsize', 14,...
  'FontName', 'Times-Roman')

print -depsc2 EMwave.eps
