% Updates a 3-trace plot display from all 3-trace plot functions

function current_plot_num = update_plot_3( new_plot_num, ...
                                           plot_handle,  ...
                                           axis_handle,  ...
                                           num_plots )

    if (new_plot_num > 0) && (new_plot_num <= num_plots)
    
        current_plot_num = new_plot_num;
        for i=1:num_plots
            set(axis_handle(i),'visible','off')
            for j=1:3
                set(plot_handle(i,j),'visible','off')
            end
        end
        set(axis_handle(current_plot_num),'visible','on')
        for j=1:3
            set(plot_handle(current_plot_num,j),'visible','on')
        end
        axes(axis_handle(current_plot_num))
        
    end
