function vector_plot ( )

%*****************************************************************************80
%
%% vector_plot() plots the flow velocity and magnetic field.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 August 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'vector_plot():\n' );
  fprintf ( 1, '  Plot velocity and magnetic fields using vectors.\n' );
%
%  Get the spatial data.
%
  [ ~, ~, L, ~, ~, ~, ~ ] = mhd_parameters ( );

  xvec = linspace ( 0.0, L, 21 );
  yvec = linspace ( -1.0, 1.0, 11 );
  
  [ X, Y ] = meshgrid ( xvec, yvec );
%
%  Evaluate the solution.
%
  [ U, V, P, B1, B2 ] = mhd_solution ( X, Y );
%
%  Make the vector field (U,V).
%
  figure ( );
  clf ( );
%
%  Plot the vectors.
%
  scale = 0.75;
  quiver ( X, Y, U, V, scale );
%
%  Finish the plot.
%
  axis ( 'equal' );
  axis ( 'tight' );
  xlabel ( '<--X-->' );
  ylabel ( '<--Y-->' );
  title ( 'Velocity vector field' );
  filename = 'velocity_vector.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Plot (B1,B2).
%
  figure ( );
  clf ( );
%
%  Plot the vectors.
%
  scale = 0.75;
  quiver ( X, Y, B1, B2, scale );
%
%  Finish the plot.
%
  axis ( 'equal' );
  axis ( 'tight' );
  xlabel ( '<--X-->' );
  ylabel ( '<--Y-->' );
  title ( 'Magnetic vector field' );
  filename = 'magnetic_vector.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  return
end

