function stsd_grid_plotter_generic(permutations_of_IPIs,azaz_record,APs_in_the_train,number_of_trials,conjoined_filename,hy,age_and_types,epoch_dividers,parameter_colors,...
        NLize_extracted,indiv_grid_plots,show_rectangular,stsd_parameters,synapse_in_question,maxes_and_mins_naught,maxes_and_mins_nonnaught,plain_extractedmatrix,...
        number_of_IPIs,epochal_colormaps)
%finds (with help from subroutines) each possible step/path and the trials which took that step/path, then (with more help) plots the values for each parameter in each epoch for matches

if show_rectangular
    width_=1/(length(permutations_of_IPIs)+2);  %add 2 here, one for the _o term, and another for the last slot which will show total charge
else
    width_=1/(length(permutations_of_IPIs)+1);  
end

target_depth=length(permutations_of_IPIs)
current_path=zeros(1,target_depth)
while target_depth>0
    while length(current_path)==target_depth
        current_path=pathfinder(current_path,permutations_of_IPIs,target_depth)
        %-------------plotting
        plot_extracted_grid_textonly(current_path,permutations_of_IPIs,azaz_record,epoch_dividers,number_of_trials,stsd_parameters,indiv_grid_plots,width_,APs_in_the_train,parameter_colors,...
            conjoined_filename,synapse_in_question,age_and_types,plain_extractedmatrix,number_of_IPIs,maxes_and_mins_naught,maxes_and_mins_nonnaught,show_rectangular,epochal_colormaps)
        %-------------
        if isequal(current_path,permutations_of_IPIs(1:target_depth))%that is, if this is the final current_path at this length
            current_path=zeros(1,target_depth-1);%to break the inner while loop and prepare for the next target_depth
        end
    end    
    target_depth=target_depth-1;
end
%plotting the responses to the first AP, for which all trials are a match
current_path=[]
plot_extracted_grid_textonly(current_path,permutations_of_IPIs,azaz_record,epoch_dividers,number_of_trials,stsd_parameters,indiv_grid_plots,width_,APs_in_the_train,parameter_colors,...
            conjoined_filename,synapse_in_question,age_and_types,plain_extractedmatrix,number_of_IPIs,maxes_and_mins_naught,maxes_and_mins_nonnaught,show_rectangular,epochal_colormaps)
%used to use plot_extracted_grid -- april 3 2006