%**************************************************************************
%This function plots the second integral of Bx and the second integral of By.
%
%Input:
%plt_file, plot file for results
%z, z position the field was measured at (m)
%int_int_bx_dz_dz, second integral of Bx (Tm)
%int_int_by_dz_dz, second integral of By (Tm)
%
%Zachary Wolf
%5/9/16

function [] = field_plot_i2xi2y(plt_file, z, int_int_bx_dz_dz, int_int_by_dz_dz)

%Initialize
figure;
hold on;

%Plot the field integral
plot(z, int_int_bx_dz_dz, 'r-', 'linewidth', 0.5);
plot(z, int_int_by_dz_dz, 'b-', 'linewidth', 0.5);

%Labels
legend('I2x', 'I2y');
title('\int \int Bx dz dz vs Z and \int \int By dz dz vs Z');
xlabel('Z (m)');
ylabel('\int \int B dz dz (Tm**2)');

%Finalize
grid on;
zoom on;
hold off;

%Print
util_print_fig(plt_file);

%Done
