%**************************************************************************
%This function plots the requested and actual field integral changes from
%the shims used to adjust the y trajectory.
%
%Input:
%plt_file, plot file for results
%anal_name, name of the analysis
%z, position along the undulator (m)
%Ix_bef, integral of Bx before shim (Tm)
%Ix_aft, integral of Bx after shim (Tm)
%Ix_shim, integral of the shim fields (Tm)
%
%Zachary Wolf, 4/22/07

function [] = shim_effect_plot_ytraj(plt_file, anal_name, z, Ix_bef, Ix_aft, Ix_shim)

%Plot the field integrals
figure;
hold on;
plot(z, Ix_aft - Ix_bef, 'b-', 'linewidth', 1.);
plot(z, Ix_shim, 'r-', 'linewidth', 1.);
title(anal_name);
xlabel('Z Position (m)');
ylabel('Int Bx dz (Tm)');
legend('After - Before', 'Desired From Shims', 'location', 'northwest');
grid on;
zoom on;
hold off;
util_print_fig(plt_file);

%Done
