function VisualizeMode(no2xy, el2no, vtr_Fz)

% Function:
%   VisualizeMode(no2xy, el2no, vtr_Fz)
% Arguments:
%   no2xy = the coordinates of the nodes
%   el2no = the nodes of the triangles
%   vtr_Fz = z-component of the eigenmode
% Returns:
%   -
% Comments:
%   Visualizes the z-component of the eigenmode together with its
%   curl. 

  % -------------------------------------------------------------
  % | ADD YOUR VISUALIZATION FO THE FIELDS HERE.                |
  % ----------------------------------------------------------  |
  %                                                          |  |
  %                                                         \    /
  %                                                          \  /
  %                                                           \/  

    


  
  %% Draw all elements (triangles)

  x1 = zeros(size(el2no,2)*3, 1);
  x2 = zeros(size(el2no,2)*3, 1);
  y1 = zeros(size(el2no,2)*3, 1);
  y2 = zeros(size(el2no,2)*3, 1);
  nan_vec = nan(1, size(el2no,2)*3);

  % Construct suitable vectors to plot using NaN hack.
  % Each vector holds either start/end-point of a line for x or y
  % coordinate. Four vectors in total.

  for elem_idx = 1:size(el2no, 2)  % for all elements
      nodes = el2no(:, elem_idx); % extract nodes
      coords = no2xy(:, nodes);  % extract coordinates for each node

      for i = 1:3
          x1((elem_idx-1)*3+i) = coords(1, i);
          x2((elem_idx-1)*3+i) = coords(1, mod(i, 3)+1);
          y1((elem_idx-1)*3+i) = coords(2, i);
          y2((elem_idx-1)*3+i) = coords(2, mod(i, 3)+1);
      end
  end

  x_all = reshape([x1'; x2'; nan_vec], [], 1);
  y_all = reshape([y1'; y2'; nan_vec], [], 1);

  figure
  hold on
  plot(x_all, y_all, 'k-');
  axis equal
  grid on



  %                                                           /\
  %                                                          /  \
  %                                                         /    \
  %                                                          |  |
  % ----------------------------------------------------------  |
  % | END OF CODE                                               |
  % -------------------------------------------------------------
