%**************************************************************************
%This function plots the fitted field peaks vs pole number.
%
%Input:
%plt_file, plot file for results
%param, structure containing the analysis parameters
%by_peak, fitted peak field strength (T)
%
%Zachary Wolf, 11/09/06

function [] = field_plot_by_peaks(plt_file, param, by_peak)

%Calculate the pole numbers
pole_num = 1 : length(by_peak);
    
%Plot the field peaks
if param.fig_vis == false
    figure('visible', 'off');
else
    figure('visible', 'on');
end
hold on;
plot(pole_num, by_peak, '*');
xlim([0, pole_num(end) + 1]);
title('By Fitted Peaks vs Pole Number');
xlabel('Pole Number');
ylabel('By (T)');
grid on;
zoom on;
hold off;

%Write the figures to the plot file
util_print_fig(plt_file);

%Done
