function from_dwnprosslogreader=dwnprosslogreader_core(samples_per_ms,raw_axis,IPI_jitter,save_prosslogreader_output,ds_datauno,ds_datados,trial,number_of_trials,...
    prosslog_name,stim_philosophy,hy,post_processing_mode,analyzable_trials_preinduction,analyzable_trials_postinduction,PSCa_failure_threshold,...
    PSCb_failure_threshold,first_postinduction_trial_of_all_nonfailure_trials,grid_raw,grid_extracted_psc,grid_extracted_charge,grid_bumps,bump_marker_scaler,bump_time_zoom,grid_bump_counts,...
    max_bump_number,network_analysis_mode,normalize_PSCs_to_first_PSC,normalize_raw_to_first_PSC,basic_stsd_charting,charge_normalization,age_and_types,colorscheme,raw_time_zoom,autapse_analysis_mode,...
    grid_latencies,induction_status,first_trial_preinduction,last_trial_preinduction,first_trial_postinduction,last_trial_postinduction,permutations_of_IPIs,...
    possible_repetitions_of_permutation_preinduction,APs_in_the_train,max_length_raw,min_length_raw,possible_repetitions_of_permutation_postinduction,grid_plots_overlaying,psc_shape_color_plot,...
    charge_shape_color_plot,bumpcount_shape_color_plot,latency_shape_color_plot,average_raw_traces)

%reads the log of processed data (created by dwnrawreader), displays figures of summary data

%NB: IPIa is the first IPI, but the current min related to (influenced by) it is the *second* min

%contents_pross_col_one=strcat('OVSF_presyn_','ITI_', 'presynstim_indices (10 vals)_','IPI_val_vec (9 vals)','hyper_area','arrhea','presyn_leak','postsyn_leak',...25
    %'PSCo_area_sum','area1','area2','area3','OVSF_postsyn','pulse_duration_presyn','pulse_duration_postsyn','sampling_rate','stim_philosophy',...34
    %'output_channel_to_presyn','text_pulse_min','temperature_during_train_mean','temperature_during_train_std','access_resistance_presyn',...39
    %'input_resistance_presyn','access_resistance_postsyn','input_resistance_postsyn','area_one_reverse','arrhea_presyn','inter_artifact_intervals_reverse(4 vals)',...48
    %'norm_to_orig_baseline_reverse (5 vals)','norm_to_perpulse_baseline_reverse (5 vals)','mean_around_min_reverse (5 vals)','min_indices_reverse (5 vals)');    %68 entries in pross_col_one

%contents_pross_col_two=strcat('OVSF_presyn_','ITI_','postsynstim_indices (5 vals)_','norm_to_orig_baseline_postsynaptic (10 vals)_',...
    %'norm_to_perpulse_baseline_postsynaptic (10 vals)_','min_indices_postsynaptic (10 vals)_','mean_aroundmin_postsyn (10 vals)','var_aroundmin_postsyn (10 vals)');  %57 values in pross_col_two


%building common variables
global trials_to_current_trial
global OVSF_presyn_history
global ITI_history         
global PSCo_latencies 
global PSCo_area_sum_history
global smoothed_o_vals     %for PSCo
global smoothed_a_vals
global smoothed_b_vals
global smoothed_c_vals
global smoothed_a_rel_o
global smoothed_b_rel_o
global smoothed_b_rel_a
global pulse_duration_presyn_history
global arrhea_history
global area_one_history
global area_two_history
global area_three_history
global temperature_mean_vals
global temperature_std_vals
global access_resistance_presyn_vals
global input_resistance_presyn_vals
global presyn_leak_vals
global postsyn_leak_vals
global IPIa_vals 
global IPIb_vals
global smoothed_o_vals_reverse
global PSCo_latencies_reverse
global area_one_reverse_history
global arrhea_presyn_history
global access_resistance_postsyn_vals
global input_resistance_postsyn_vals
global OVSF_postsyn_history
global pulse_duration_postsyn_history

global failure_count_preinduction   %by setting stim intensity a/o duration to vary, then throwing out failure trials, one can test whether all APs are equal or if PSC (peak or area)
global failure_count_postinduction  %increases with intensity a/o duration 
global PSCo_failthreshstr

if autapse_analysis_mode,autaptic_reporter='autaptic';else,autaptic_reporter='non-autaptic';end

if trial==1                             %these variables are all cleared on the first trial then built trial-by-trial
    trials_to_current_trial=[];
    OVSF_presyn_history=[];
    ITI_history=[];
    PSCo_latencies=[];
    PSCo_area_sum_history=[];
    smoothed_o_vals=[];
    smoothed_a_vals=[];
    smoothed_b_vals=[];
    smoothed_c_vals=[];
    smoothed_a_rel_o=[];
    smoothed_b_rel_o=[];
    smoothed_b_rel_a=[];
    pulse_duration_presyn_history=[];
    arrhea_history=[];
    area_one_history=[];
    area_two_history=[];
    area_three_history=[];
    temperature_mean_vals=[];
    temperature_std_vals=[];
    access_resistance_presyn_vals=[];
    input_resistance_presyn_vals=[];
    presyn_leak_vals=[];
    postsyn_leak_vals=[]; 
    IPIa_vals=[];
    IPIb_vals=[];
    smoothed_o_vals_reverse=[];
    PSCo_latencies_reverse=[];
    area_one_reverse_history=[];
    arrhea_presyn_history=[];
    access_resistance_postsyn_vals=[];
    input_resistance_postsyn_vals=[];
    OVSF_postsyn_history=[];
    pulse_duration_postsyn_history=[];
end


trials_to_current_trial=[trials_to_current_trial;trial];
OVSF_presyn_history=[OVSF_presyn_history;ds_datados(1)];
ITI_history=[ITI_history;ds_datados(2)];
PSCo_latencies=[PSCo_latencies;((ds_datados(28)-ds_datauno(3))/samples_per_ms)];
PSCo_area_sum_history=[PSCo_area_sum_history;ds_datauno(26)];
smoothed_o_vals=[smoothed_o_vals;ds_datados(38)];       %the terms 'mam' and 'smoothed' are used synonymously
smoothed_a_vals=[smoothed_a_vals;ds_datados(39)];
smoothed_b_vals=[smoothed_b_vals;ds_datados(40)]; 
smoothed_c_vals=[smoothed_c_vals;ds_datados(41)];
smoothed_a_rel_o=[smoothed_a_rel_o;(ds_datados(39)/ds_datados(38))];
smoothed_b_rel_o=[smoothed_b_rel_o;(ds_datados(40)/ds_datados(38))];
smoothed_b_rel_a=[smoothed_b_rel_a;(ds_datados(40)/ds_datados(39))];
pulse_duration_presyn_history=[pulse_duration_presyn_history;ds_datauno(31)];
arrhea_history=[arrhea_history;ds_datauno(23)];     %for stim_phil 2, could extract areas from this each trial with sthg like odz=[1:2:trial] evez=[2:2:trial], arrhea_history(odz)
area_one_history=[area_one_history;ds_datauno(27)];
area_two_history=[area_two_history;ds_datauno(28)];
area_three_history=[area_three_history;ds_datauno(29)];
temperature_mean_vals=[temperature_mean_vals;ds_datauno(37)];
temperature_std_vals=[temperature_std_vals;ds_datauno(38)];
access_resistance_presyn_vals=[access_resistance_presyn_vals;ds_datauno(39)];
input_resistance_presyn_vals=[input_resistance_presyn_vals;ds_datauno(40)];
presyn_leak_vals=[presyn_leak_vals;ds_datauno(24)];
postsyn_leak_vals=[postsyn_leak_vals;ds_datauno(25)];
IPIa_vals=[IPIa_vals;ds_datauno(13)];                  
IPIb_vals=[IPIb_vals;ds_datauno(14)];
smoothed_o_vals_reverse=[smoothed_o_vals_reverse;ds_datauno(59)];
PSCo_latencies_reverse=[PSCo_latencies_reverse;(ds_datauno(64)-ds_datados(3)/samples_per_ms)];
area_one_reverse_history=[area_one_reverse_history;ds_datauno(43)];
arrhea_presyn_history=[arrhea_presyn_history;ds_datauno(44)];
access_resistance_postsyn_vals=[access_resistance_postsyn_vals;ds_datauno(41)];
input_resistance_postsyn_vals=[input_resistance_postsyn_vals;ds_datauno(42)];
OVSF_postsyn_history=[OVSF_postsyn_history;ds_datauno(30)];
pulse_duration_postsyn_history=[pulse_duration_postsyn_history;ds_datauno(32)];

%for use in plotting the current trial
OVSF_presyn=ds_datauno(1);
hyper_area=ds_datauno(22);
arrhea=ds_datauno(23);
presyn_leak=ds_datauno(24);
postsyn_leak=ds_datauno(25);


%---------------------------------
%processing for stim_philosophy==2
% if stim_philosophy==2
%     %perpulsenorm_pointmin_vals_even is renamed as ppv_even
%     %perpulsenorm_pointmin_vals_odd is renamed as ppv_odd
%     global ppv_even
%     global ppv_odd
%     global mam_even     %mam is mean around min
%     global mam_odd      %mam is mean around min
%     global arrhea_even
%     global hyperarea_even
%     global area1_even
%     global area2_even
%     global area3_even
%     global subarea_even
%     global arrhea_odd
%     global hyperarea_odd
%     global area1_odd
%     global area2_odd
%     global area3_odd
%     global subarea_odd
%     global ovsf_presyn_history_even
%     global ovsf_presyn_history_odd
%     global iti_history_even
%     global iti_history_odd
%     global eve  %eve and ode are used in the correlation and covariance below
%     global ode
%     
%     if trial==1
%         ppv_even=[];
%         ppv_odd=[];
%         mam_even=[];
%         mam_odd=[];
%         arrhea_even=[];
%         hyperarea_even=[];
%         area1_even=[];
%         area2_even=[];
%         area3_even=[];
%         subarea_even=[];
%         arrhea_odd=[];
%         hyperarea_odd=[];
%         area1_odd=[];
%         area2_odd=[];
%         area3_odd=[];
%         subarea_odd=[];
%         ovsf_presyn_history_even=[];
%         ovsf_presyn_history_odd=[];
%         iti_history_even=[];
%         iti_history_odd=[];
%         eve=[];
%         ode=[];
%     end
%     
%     global even_stim_times
%     global odd_stim_times
%     
%     if trial==1
%         odd_stim_times=[];
%         odd_stim_times=[(ds_datauno(3:12)-ds_datauno(3))/samples_per_ms];
%     end    
%     if trial==2
%         even_stim_times=[];
%         even_stim_times=[(ds_datauno(3:12)-ds_datauno(3))/samples_per_ms];
%     end
% 
%     if ceil(trial/2)==(trial/2)             %even-numbered trials
%         ppv_even=[ppv_even; ds_datados(18:27)'];      %PSCs -- adding a new row each even trial, with the perpulsenorm_pointmin_vals
%         mam_even=[mam_even; ds_datados(38:47)'];
%         arrhea_even=[arrhea_even;ds_datauno(23)];
%         hyperarea_even=[hyperarea_even;ds_datauno(22)];
%         area1_even=[area1_even;ds_datauno(27)];
%         area2_even=[area2_even;ds_datauno(28)];
%         area3_even=[area3_even;ds_datauno(29)];
%         subarea_even=[subarea_even;(ds_datauno(27)+ds_datauno(28)+ds_datauno(29))];
%         ovsf_presyn_history_even=[ovsf_presyn_history_even;ds_datauno(1)];
%         iti_history_even=[iti_history_even;ds_datauno(2)];        
%     elseif ceil(trial/2)~=(trial/2)         %odd-numbered trials
%         ppv_odd=[ppv_odd; ds_datados(18:27)'];
%         mam_odd=[mam_odd; ds_datados(38:47)'];
%         arrhea_odd=[arrhea_odd;ds_datauno(23)];
%         hyperarea_odd=[hyperarea_odd;ds_datauno(22)];
%         area1_odd=[area1_odd;ds_datauno(27)];
%         area2_odd=[area2_odd;ds_datauno(28)];
%         area3_odd=[area3_odd;ds_datauno(29)];
%         subarea_odd=[subarea_odd;(ds_datauno(27)+ds_datauno(28)+ds_datauno(29))];
%         ovsf_presyn_history_odd=[ovsf_presyn_history_odd;ds_datauno(1)];
%         iti_history_odd=[iti_history_odd;ds_datauno(2)];
%     end
% end
% 
% %--------------------------------
% %by this point in the code all variables for either stimulus type have been built -- hence if working from the reprosslog, can open that log and read out all the values here -- 
% %call the fnxn that opens the reprosslog, have it read the correct dataset and return all the values to here -- prosslogreader_core will analyze & plot all
% %from the command line tell the figure(s) in question to 'hold on', then run a different trial
% %can add a third clause to all the boolean statements below -- if blah | blah | re_processing_mode  (this new mode would be controlled from post_processor, for instance
% %by passing the reprosslog name and the dataset in question to here -- then the script for opening the reprosslog/extracting data would do so, feed the data back here,
% %and prosslogreader_core would plot it  -- may be easier to open the reprosslog and the right dataset manually from here
% %if reprosslogreader_mode
%     %from_dwnprosslogreader=[];
%     %open the prosslogreader and say each variable = the relevant dimension of the relevant dataset
% %end
% 
% %also, since all variables have been 'formed' by this point, they can be stored at this juncture, if we're not in reprosslogreader mode
% %if post_processing_mode & store_prosslogreader_output
%     %must first make them equal in length;  most should be equal, only those which run only on even or odd trials should be short
%     %from_dwnprosslogreader=[trials_to_current_trial OVSF_presyn_history ITI_history PSCo_latencies PSCo_area_sum_history smoothed_o_vals smoothed_a_vals smoothed_b_vals smoothed_a_rel_o...
%             %smoothed_b_rel_o smoothed_b_rel_a pulse_duration_presyn_history ];  
% %put all the info which sums up an experiment into this matrix -- this will facilitate comparisons with other experiments
% %for instance, opening the master file containing all experiments, you look at column x in each relevant dataset to compare, say, mean_mam_odd across those expts
% %end
% 
% %dummy
% from_dwnprosslogreader=5;

%--------------------------------

% if stim_philosophy==2
    %for plotting ppv_ and mam_ together
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         if trial>2
%             mean_ppv_odd=mean(ppv_odd);,std_ppv_odd=std(ppv_odd);,mean_mam_odd=mean(mam_odd);,std_mam_odd=std(mam_odd);
%             figure(11)
%             odd_IPI_double=cat(2,odd_stim_times',odd_stim_times');
%             errorbar(odd_IPI_double,(cat(2,mean_ppv_odd',mean_mam_odd')),(cat(2,std_ppv_odd',std_mam_odd')))
%             title('Mean and SD PSC v IPI for the odd stimulus')
%             legend (strcat(prosslog_name,' through trial ',num2str(trial)))
%             legend boxoff
%         end
%     end
% 
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         if trial>3
%             mean_ppv_even=mean(ppv_even);,std_ppv_even=std(ppv_even);,mean_mam_even=mean(mam_even);,std_mam_even=std(mam_even);
%             figure(12)
%             even_IPI_double=cat(2,even_stim_times',even_stim_times');
%             errorbar(even_IPI_double,(cat(2,mean_ppv_even',mean_mam_even')),(cat(2,std_ppv_even',std_mam_even')))
%             title('Mean and SD PSC v IPI for the even stimulus')
%             legend (strcat(prosslog_name,' through trial ',num2str(trial)))
%             legend boxoff
%         end
%     end

    %this solution is less preferred than using another .hdf file to store the output of prosslogreader, however it may be faster in the short term
    %global pre_induction        %these variables are set in post_processor to distinguish before stdp induction trials from after stdp induction trials
    %global post_induction       %that way the two sets of variables can be called up together and plotted together
    %if pre_induction
    %    save even_IPI_vals_pre even_IPI_vals
    %    save odd_IPI_vals_pre odd_IPI_vals
    %    save ppv_even_pre ppv_even
    %    save ppv_odd_pre ppv_odd
    %    save mam_even_pre mam_even
    %    save mam_odd_pre mam_odd
    %elseif post_induction
    %    save even_IPI_vals_post even_IPI_vals
    %    save odd_IPI_vals_post odd_IPI_vals
    %    save ppv_even_post ppv_even
    %    save ppv_odd_post ppv_odd
    %    save mam_even_post mam_even
    %    save mam_odd_post mam_odd
    %end

%     figure(4)
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         %plotting PSCo v trial
%         figure(4)
%         subplot(5,2,1)
%         axis([1 trial raw_axis(3) raw_axis(4)])
%         c=colormap(hsv(length(trials_to_current_trial)));
%         for i=1:length(trials_to_current_trial)
%             hold on
%             s=int2str(i);
%             text(IPIa_vals(i),smoothed_a_vals(i),s,'FontSize',7,'Color',c(i,:))
%             %plot(trials_to_current_trial(i),smoothed_o_vals(i),'d','Color',c(i,:))
%         end
%       
%         subplot(5,2,3)
%         if trial>2
%             errorbar(odd_stim_times,mean_mam_odd,std_mam_odd)
%             %axis([-10 1100 raw_axis(3) raw_axis(4)])
%             title('Mean normalized mean peak PSC and SD, odd trials')
%         end
%     end

%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         subplot(5,2,4)    
%         if trial>3
%             errorbar(even_stim_times,mean_mam_even,std_mam_even)
%             before=0
%             after=bitcmp(before,1) %complement
%             if before
%                 mam_odd_bbefforre=mam_odd
%                 mam_even_bbefforre=mam_even
%                 save bbefforre odd_stim_times even_stim_times mam_odd_bbefforre mam_even_bbefforre
%             elseif after
%                 mam_odd_afftterr=mam_odd
%                 mam_even_afftterr=mam_even
%                 save afftterr odd_stim_times even_stim_times mam_odd_afftterr mam_even_afftterr
%             end
%             %axis([-10 1100 raw_axis(3) raw_axis(4)])
%             title('Mean normalized mean peak PSC and SD, even trials')
%         end
%     end
% 
% 
%     %plotting the mean paired pulse ratio
%     
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         subplot(5,2,5)
%         if trial>2
%             plot(odd_stim_times(2:length(odd_stim_times)),(mean_mam_odd(2:length(mean_mam_odd))./mean_mam_odd(1:(length(mean_mam_odd)-1))),'ko');
%             title('Mean PPR, odd trials')
%         end
%     end
% 
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         subplot(5,2,6)
%         if trial>3
%             plot(even_stim_times(2:length(even_stim_times)),(mean_mam_even(2:length(mean_mam_even))./mean_mam_even(1:(length(mean_mam_even)-1))),'ko');
%             title('Mean PPR, even trials')
%         end
%     end
% 
% 
% 
%     %plotting the ziggyzaggy curve showing mean and SD normalized mean peak PSC as a function of IPI (x axis) and sequence (connecting lines, starting at IPI=0)
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         subplot(5,2,[7;9])
%         if trial>2
%             errorbar(odd_IPI_double,(cat(2,mean_ppv_odd',mean_mam_odd')),(cat(2,std_ppv_odd',std_mam_odd')))
%             title('Mean and SD PSC v IPI for the odd stimulus')
%         end
%     end
% 
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         subplot(5,2,[8;10])
%         if trial>3
%             errorbar(even_IPI_double,(cat(2,mean_ppv_even',mean_mam_even')),(cat(2,std_ppv_even',std_mam_even')))
%             title('Mean and SD PSC v IPI for the even stimulus')
%         end
%     end
%     
%     %could make this a post_processing_mode only thing, and also do only on the final trial -- roger (oct 20, 2003)
%     if ~post_processing_mode | (post_processing_mode & (trial==number_of_trials))   %this structure has a bit of redundancy built in
%         if trial>2
%             eve=mam_even(:,1:2) %for correlation and covariance btwn PSCo and PSCa, even train
%             eve_ab=mam_even(:,2:3) %for correlation btwn PSCa and PSCb, even train
%             ode=mam_odd(:,1:2)
%             ode_ab=mam_odd(:,2:3)
%             eve_cov=cov(eve)
%             [r_eve p_eve]=corrcoef(eve)
%             eve_ab_cov=cov(eve_ab)
%             [r_eve_ab p_eve_ab]=corrcoef(eve_ab)
%             ode_cov=cov(ode)
%             [r_ode p_ode]=corrcoef(ode)
%             ode_ab_cov=cov(ode_ab)
%             [r_ode_ab p_ode_ab]=corrcoef(ode_ab)
%         
%             figure(31)       %deals with correlation and covariance
%             subplot(2,2,1)
%             plot(mam_odd(:,1),mam_odd(:,2),'kp')
%             ode_cov_str=num2str(ode_cov); r_ode_str=num2str(r_ode); p_ode_str=num2str(p_ode);
%             title('PSCo and PSCa, odd trials')
%             abc=strcat(strcat('Covariance',ode_cov_str),strcat('R odd',r_ode_str),strcat('P odd',p_ode_str));
%             text(-.05,-.05,abc,'FontSize',9)
%             subplot(2,2,2)
%             plot(mam_odd(:,2),mam_odd(:,3),'kp')
%             ode_ab_cov_str=num2str(ode_ab_cov); r_ode_ab_str=num2str(r_ode_ab); p_ode_ab_str=num2str(p_ode_ab);
%             title('PSCa and PSCb, odd trials')
%             def=strcat(strcat('Covariance',ode_ab_cov_str),strcat('R odd',r_ode_ab_str),strcat('P odd',p_ode_ab_str));
%             text(-.095,-.008,def,'FontSize',9)
%             subplot(2,2,3)
%             plot(mam_even(:,1),mam_even(:,2),'kp')
%             eve_cov_str=num2str(eve_cov); r_eve_str=num2str(r_eve); p_eve_str=num2str(p_eve);
%             title('PSCo and PSCa, even trials')
%             ghi=strcat(strcat('Covariance',eve_cov_str),strcat('R even',r_eve_str),strcat('P even',p_eve_str));
%             text(min(mam_even(:,1)),max(mam_even(:,2)),ghi,'FontSize',7)
%             subplot(2,2,4)
%             plot(mam_even(:,2),mam_even(:,3),'kp')
%             eve_ab_cov_str=num2str(eve_ab_cov); r_eve_ab_str=num2str(r_eve_ab); p_eve_ab_str=num2str(p_eve_ab);
%             title('PSCa and PSCb, even trials')
%             jkl=strcat(strcat('Covariance',eve_ab_cov_str),strcat('R even',r_eve_ab_str),strcat('P even',p_eve_ab_str));
%             text(min(mam_even(:,2)),max(mam_even(:,3)),jkl,'FontSize',7)
%             
%             placeholder_odd=[1:length(arrhea_odd)];
%             placeholder_even=[1:length(arrhea_even)];
%             %a plot of the sum of current with respect to time (i.e. charge) over certain windows
%             figure(13)
%             subplot(2,3,1)%the subareas versus trial
%             plot(placeholder_odd,subarea_odd,'r',placeholder_even,subarea_even,'g')
%             ylabel('Charge over subregions')
%             subplot(2,3,4)%the total versus trial
%             plot(placeholder_odd,arrhea_odd,'r',placeholder_even,arrhea_even,'g')
%             ylabel('Total charge')
%             xlabel('Trial')
%             legend('Odd trials','Even trials',prosslog_name)
%             set(legend,'Position',[0.03934 0.480931 0.215625 0.0697321])
%             legend boxoff
%             subplot(2,3,2)%the subareas versus OVSF_presyn
%             plot(ovsf_presyn_history_odd,subarea_odd,'rx',ovsf_presyn_history_even,subarea_even,'gx')
%             subplot(2,3,5)%the total areas versus OVSF_presyn
%             plot(ovsf_presyn_history_odd,arrhea_odd,'rx',ovsf_presyn_history_even,arrhea_even,'gx')
%             xlabel('OVSF\_presyn')
%             subplot(2,3,3)%the subareas versus ITI
%             plot(iti_history_odd,subarea_odd,'rx',iti_history_even,subarea_even,'gx')
%             subplot(2,3,6)%the total areas versus ITI
%             plot(iti_history_odd,arrhea_odd,'rx',iti_history_even,arrhea_even,'gx')
%             xlabel('ITI')
%             
%             figure(14)
%             subplot(2,3,1)%the areas v. trial for the odd
%             plot(placeholder_odd,area1_odd,'r',placeholder_odd,area2_odd,'g',placeholder_odd,area3_odd,'b')
%             ylabel('Charge, odd trials')
%             subplot(2,3,4)%the areas v. trial for the even
%             plot(placeholder_even,area1_even,'r',placeholder_even,area2_even,'g',placeholder_even,area3_even,'b')
%             ylabel('Charge, even trials')
%             xlabel('Trial')
%             subplot(2,3,2)%the areas v. OVSF_presyn for the odd
%             plot(ovsf_presyn_history_odd,area1_odd,'rx',ovsf_presyn_history_odd,area2_odd,'gx',ovsf_presyn_history_odd,area3_odd,'bx')
%             subplot(2,3,5)%the areas v. OVSF_presyn for the even
%             plot(ovsf_presyn_history_even,area1_even,'rx',ovsf_presyn_history_even,area2_even,'gx',ovsf_presyn_history_even,area3_even,'bx')
%             xlabel('OVSF\_presyn')
%             subplot(2,3,3)%plot3d of ITI and OVSF_presyn v. odd areas
%             plot(iti_history_odd,area1_odd,'rx',iti_history_odd,area2_odd,'gx',iti_history_odd,area3_odd,'bx')
%             subplot(2,3,6)%plot3d of ITI and OVSF_presyn v. even areas
%             plot(iti_history_even,area1_even,'rx',iti_history_even,area2_even,'gx',iti_history_even,area3_even,'bx')
%             xlabel('ITI')
%             legend('Area1','Area2','Area3',prosslog_name)
%             set(legend,'Position',[0.03934 0.480931 0.215625 0.0697321])
%             legend boxoff
%         end
%     end
%----------------------------------
%this section is for the randomly-varying stimulus trains
% elseif stim_philosophy==1
%    disp('hello')
%     if (post_processing_mode & trial==number_of_trials) | ~post_processing_mode
%         if trial>=first_postinduction_trial_of_all_nonfailure_trials
%             includes_postinduction_data=1
%         else
%             includes_postinduction_data=0;
%         end
%                 
%         %------------------------------
%         if ~isempty(hy)
%             %analyzing stsd
%             if basic_stsd_charting(1)
%                 stsd_basic_chart(number_of_trials,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,prosslog_name,autaptic_reporter,hy,...
%                     basic_stsd_charting(2),induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction)
%             end
%             clrmp=eval(['colormap(' colorscheme '(' num2str(trial) '))']);  %note:  tread cautiously w/ eval, and watch it doesn't work as 'try/catch' to let errors pass
%             if grid_raw
%                 stsd_grid_plotter_raw(clrmp,normalize_raw_to_first_PSC,normalize_PSCs_to_first_PSC,raw_axis,trials_to_current_trial,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,...
%                     APs_in_the_train,max_length_raw,number_of_trials,prosslog_name,autaptic_reporter,hy,age_and_types,raw_time_zoom,induction_status,analyzable_trials_preinduction,...
%                     possible_repetitions_of_permutation_postinduction,min_length_raw,average_raw_traces)
%             end
%             if grid_extracted_psc
%                 stsd_grid_plotter_psc(clrmp,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,prosslog_name,...
%                     autaptic_reporter,hy,smoothed_o_vals,smoothed_a_vals,smoothed_b_vals,smoothed_c_vals,normalize_PSCs_to_first_PSC,age_and_types,induction_status,analyzable_trials_preinduction,...
%                     possible_repetitions_of_permutation_postinduction,grid_plots_overlaying)
%             end
%             if grid_extracted_charge
%                 stsd_grid_plotter_charge(clrmp,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,...
%                     prosslog_name,autaptic_reporter,hy,charge_normalization,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,...
%                     grid_plots_overlaying)
%             end
%             if grid_bumps
%                 stsd_grid_plotter_bumps(colorscheme,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,prosslog_name,...
%                     autaptic_reporter,hy,smoothed_o_vals,smoothed_a_vals,smoothed_b_vals,smoothed_c_vals,normalize_PSCs_to_first_PSC,bump_marker_scaler,bump_time_zoom,...
%                     max_bump_number,max_length_raw,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction)
%             end
%             if grid_bump_counts
%                 stsd_grid_plotter_bump_counts(clrmp,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,...
%                     prosslog_name,autaptic_reporter,hy,max_bump_number,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,...
%                     grid_plots_overlaying)
%             end
%             if grid_latencies
%                 stsd_grid_plotter_latency(clrmp,permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,...
%                     prosslog_name,autaptic_reporter,hy,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,grid_plots_overlaying)    
%             end
%             if psc_shape_color_plot
%                 stsd_psc_shapecolorplot(permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,prosslog_name,...
%                     autaptic_reporter,hy,smoothed_o_vals,smoothed_a_vals,smoothed_b_vals,smoothed_c_vals,normalize_PSCs_to_first_PSC,age_and_types,induction_status,analyzable_trials_preinduction,...
%                     possible_repetitions_of_permutation_postinduction,grid_plots_overlaying)
%             end
%             if charge_shape_color_plot
%                  disp('hello there old friend')
%                  stsd_charge_shapecolorplot(permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,prosslog_name,autaptic_reporter,...
%                      hy,charge_normalization,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,grid_plots_overlaying)
%             end
%             if bumpcount_shape_color_plot
%                 stsd_bumpcount_shapecolorplot(permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,...
%                     prosslog_name,autaptic_reporter,hy,max_bump_number,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,...
%                     grid_plots_overlaying)    
%             end
%             if latency_shape_color_plot
%                 stsd_latency_shapecolorplot(permutations_of_IPIs,possible_repetitions_of_permutation_preinduction,APs_in_the_train,number_of_trials,...
%                     prosslog_name,autaptic_reporter,hy,age_and_types,induction_status,analyzable_trials_preinduction,possible_repetitions_of_permutation_postinduction,grid_plots_overlaying)
%             end
%         end
%         %if network_analysis_mode(1)
%             shmersh=-1*arrhea_history;
% 			figure(35)
%             subplot(2,2,1:2)
%             plot(trials_to_current_trial,shmersh,'k-')
%             title('prosslog_name')
%             xlabel('trial')
%             ylabel('Q total')
% 			subplot(2,2,3:4)
% 			plot(temperature_mean_vals,shmersh,'ko','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',6)
%             xlabel('temperature')
%             ylabel('Q total')
%             %end
%         
%         figure(4)
%         subplot(10,2,[1:2:3])
%         hold on
%         plot(trials_to_current_trial(1:analyzable_trials_preinduction),smoothed_o_vals(1:analyzable_trials_preinduction),'k.',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_o_vals(first_postinduction_trial_of_all_nonfailure_trials:end),'r.',...
%             trials_to_current_trial(1:analyzable_trials_preinduction),smoothed_a_vals(1:analyzable_trials_preinduction),'ko',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_a_vals(first_postinduction_trial_of_all_nonfailure_trials:end),'ro',...
%             trials_to_current_trial(1:analyzable_trials_preinduction),smoothed_b_vals(1:analyzable_trials_preinduction),'k>',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_b_vals(first_postinduction_trial_of_all_nonfailure_trials:end),'r>')
%         title('PSC mins by trial')
%         if isempty(failure_count_preinduction)
%             failure_count_preinduction=0;
%         end
%         if isempty(failure_count_postinduction)
%             failure_count_postinduction=0;
%         end
%         preinducfailurestr=num2str(failure_count_preinduction);
%         postinducfailurestr=num2str(failure_count_postinduction);
%         %OVSF_presynstr=num2str(OVSF_presyn);
%         %trialstr=num2str(trial);
%         %hyperareastr=num2str(hyper_area);
%         %arrheastr=num2str(arrhea);
%         presynleakstr=num2str(presyn_leak);
%         postsynleakstr=num2str(postsyn_leak);
%         firsttrialprestr=num2str(first_trial_preinduction);
%         lasttrialprestr=num2str(last_trial_preinduction);
%         firsttrialpoststr=num2str(first_trial_postinduction);
%         lasttrialpoststr=num2str(last_trial_postinduction);
%         if includes_postinduction_data, legend('o (pre)','o (post)','a (pre)','a (post)','b (pre)','b (post)'),else legend('o','a','b'),end
%         set(legend,'Position',[0.03 .82 0.0706    0.1024])
%         if ~isempty(hy),legend boxoff,end
%         PSCa_failures_preinduc=find(smoothed_a_vals(1:analyzable_trials_preinduction)>PSCa_failure_threshold)
%         PSCa_failures_postinduc=find(smoothed_a_vals(first_postinduction_trial_of_all_nonfailure_trials:end)>PSCa_failure_threshold)
%         if isempty(PSCa_failures_preinduc)
%             PSCa_failures_preinduc=0;
%         end
%         if isempty(PSCa_failures_postinduc)
%             PSCa_failures_postinduc=0;
%         end
%         PSCb_failures_preinduc=find(smoothed_b_vals(1:analyzable_trials_preinduction)>PSCb_failure_threshold)
%         PSCb_failures_postinduc=find(smoothed_b_vals(analyzable_trials_preinduction+1:end)>PSCb_failure_threshold)
%         if isempty(PSCb_failures_preinduc)
%             PSCb_failures_preinduc=0;
%         end
%         if isempty(PSCb_failures_postinduc)
%             PSCb_failures_postinduc=0;
%         end
%         afailsprestr=num2str(PSCa_failures_preinduc);
%         afailspoststr=num2str(PSCa_failures_postinduc);
%         bfailsprestr=num2str(PSCb_failures_preinduc);
%         bfailspoststr=num2str(PSCb_failures_postinduc);
%         PSCa_failthreshstr=num2str(PSCa_failure_threshold);
%         PSCb_failthreshstr=num2str(PSCb_failure_threshold);
%         zzz=strcat(prosslog_name,'Preind:',firsttrialprestr,'-',lasttrialprestr,'PSCo fail thresh:',PSCo_failthreshstr,'Preind PSCo fails=',preinducfailurestr,...
%             'PSCa fail thresh:',PSCa_failthreshstr,'Preind PSCa fails=',afailsprestr,'PSCb fail thresh:',PSCb_failthreshstr,...
%             'Preind PSCb fails=',bfailsprestr,'Postind:',firsttrialpoststr,'-',lasttrialpoststr,'Postind PSCo fails=',postinducfailurestr,...
%             'Postind PSCa fails=',afailspoststr,'Postind PSCb fails=',bfailspoststr,'presyn\_leak=',presynleakstr,'postsyn\_leak=',postsynleakstr);
%         for_plotting_only=[smoothed_o_vals smoothed_a_vals];
%         frick=min(min(for_plotting_only));
%         frack=max(max(for_plotting_only));
%         %frock=frick-frack
%         yval=frack+0.6*(frack-frick);
%         text(0,yval,zzz)
%         
%         subplot(10,2,[5;7])
%         plot(IPIa_vals(1:analyzable_trials_preinduction),smoothed_a_rel_o(1:analyzable_trials_preinduction),'k.',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_a_rel_o(first_postinduction_trial_of_all_nonfailure_trials:end),'r.',...
%             IPIa_vals(1:analyzable_trials_preinduction),smoothed_b_rel_o(1:analyzable_trials_preinduction),'ko',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_b_rel_o(first_postinduction_trial_of_all_nonfailure_trials:end),'ro',...
%             IPIa_vals(1:analyzable_trials_preinduction),smoothed_b_rel_a(1:analyzable_trials_preinduction),'k>',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),smoothed_b_rel_a(first_postinduction_trial_of_all_nonfailure_trials:end),'r>')
%         title('PSC mins by IPIa')
%         if includes_postinduction_data,legend('a\_rel\_o','a\_rel\_o (post)','b\_rel\_o','b\_rel\_o (post)','b\_rel\_a','b\_rel\_a (post)'),else legend('a\_rel\_o','b\_rel\_o','b\_rel\_a'),end
%         set(legend,'Position',[0.01    0.65    0.0706    0.1024])
%         if ~isempty(hy),legend boxoff,end
%         
%         subplot(10,2,[9;11])
%         scaled_o=smoothed_o_vals*(mean(arrhea_history)/mean(smoothed_o_vals)); %scaling the PSCo matrix st its mean equals the mean of the arrhea matrix
%         scaled_late=area_three_history*(mean(arrhea_history)/mean(area_three_history)); 
%         plot(OVSF_presyn_history(1:analyzable_trials_preinduction),scaled_o(1:analyzable_trials_preinduction),'k.',...
%             OVSF_presyn_history(first_postinduction_trial_of_all_nonfailure_trials:end),scaled_o(first_postinduction_trial_of_all_nonfailure_trials:end),'r.',...
%             OVSF_presyn_history(1:analyzable_trials_preinduction),scaled_late(1:analyzable_trials_preinduction),'ko',...
%             OVSF_presyn_history(first_postinduction_trial_of_all_nonfailure_trials:end),scaled_late(first_postinduction_trial_of_all_nonfailure_trials:end),'ro',...
%             OVSF_presyn_history(1:analyzable_trials_preinduction),arrhea_history(1:analyzable_trials_preinduction),'k>',...
%             OVSF_presyn_history(first_postinduction_trial_of_all_nonfailure_trials:end),arrhea_history(first_postinduction_trial_of_all_nonfailure_trials:end),'r>')
%         if includes_postinduction_data, legend('scaled PSCo','scaled PSCo (post)','scaled Q c','scaled Q c (post)','total Q','total Q (post)'),else legend('scaled PSCo','scaled Q c','total Q'),end
%         set(legend,'Position',[0.01    0.45    0.0706    0.1024])
%         if ~isempty(hy),legend boxoff,end
%         title('total and late charge and scaled PSCo v OVSF')
%             
%         subplot(10,2,[6;8])
%         plot(trials_to_current_trial(1:analyzable_trials_preinduction),PSCo_area_sum_history(1:analyzable_trials_preinduction),'ks',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),PSCo_area_sum_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rs',...
%             trials_to_current_trial(1:analyzable_trials_preinduction),area_one_history(1:analyzable_trials_preinduction),'kp',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),area_one_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rp',...
%             trials_to_current_trial(1:analyzable_trials_preinduction),area_two_history(1:analyzable_trials_preinduction),'k>',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),area_two_history(first_postinduction_trial_of_all_nonfailure_trials:end),'r>',...
%             trials_to_current_trial(1:analyzable_trials_preinduction),area_three_history(1:analyzable_trials_preinduction),'kd',...
%             trials_to_current_trial(first_postinduction_trial_of_all_nonfailure_trials:end),area_three_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rd')
%         if includes_postinduction_data, legend('Q o','Q o (post)','Q a','Q a (post)','Q b','Q b (post)','Q c','Q c (post)'),else legend('Q o','Q a','Q b','Q c'), end
%         set(legend,'Position',[.9 .67 0.0706 0.1024])
%         if ~isempty(hy),legend boxoff,end
%         title('charge v. trial')
%         
%         subplot(10,2,[10;12])
%         plot(IPIa_vals(1:analyzable_trials_preinduction),PSCo_area_sum_history(1:analyzable_trials_preinduction),'ks',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),PSCo_area_sum_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rs',...
%             IPIa_vals(1:analyzable_trials_preinduction),area_one_history(1:analyzable_trials_preinduction),'kp',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),area_one_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rp',...
%             IPIa_vals(1:analyzable_trials_preinduction),area_two_history(1:analyzable_trials_preinduction),'k>',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),area_two_history(first_postinduction_trial_of_all_nonfailure_trials:end),'r>',...
%             IPIa_vals(1:analyzable_trials_preinduction),area_three_history(1:analyzable_trials_preinduction),'kd',...
%             IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end),area_three_history(first_postinduction_trial_of_all_nonfailure_trials:end),'rd')
%         if includes_postinduction_data,legend('Q o','Q o (post)','Q a','Q a (post)','Q b','Q b (post)','Q c','Q c (post)'),else legend('Q o','Q a','Q b','Q c'), end
%         set(legend,'Position',[.9 .5 0.0706 0.1024])
%         if ~isempty(hy),legend boxoff,end
%         title('charge v. IPIa')
%         
%         if ~isempty(hy)
%             subplot(10,2,[13:2:19])
%             hold on
%             zz=colormap(hsv(hy(1,1)));
%             %target=[20 30 50 100 200];  %this is needed b/c of the modified use of randomtrain (limited to 5 values)
%             %target=[100 125 150];  %MUST revert to line above this, this is for test with already-completed expts only
%             plot_place_pre=[1:2:(2*hy(1,1)-1)];
%             plot_place_post=[2:2:(2*hy(1,1))];
%             for ioioi=1:hy(1,1)
%                 target(ioioi)=((ioioi-1)*hy(3,1))+hy(2,1);
%                 matches=find(abs(IPIa_vals(1:analyzable_trials_preinduction)-target(ioioi))<IPI_jitter);
%                 figure(4)
%                 subplot(10,2,[13:2:19])
%                 plot(smoothed_o_vals(matches),smoothed_a_vals(matches),'s','Color',zz(ioioi,:))
%                 hold on
%                 figure(9)
%                 subplot(hy(1,1),2,1)
%                 title(strcat(prosslog_name,'--PSCo v PSCa, by IPI, before (L col) and after (R col)'))
%                 hold on
%                 subplot(hy(1,1),2,plot_place_pre(ioioi))
%                 plot(smoothed_o_vals(matches),smoothed_a_vals(matches),'s','Color',zz(ioioi,:))
%                 hold on
%             end
%             
%             figure(4)
%             subplot(10,2,[13:2:19])
%             hold on
%             IPIa_post=IPIa_vals(first_postinduction_trial_of_all_nonfailure_trials:end);
%             sov_post=smoothed_o_vals(first_postinduction_trial_of_all_nonfailure_trials:end);
%             sav_post=smoothed_a_vals(first_postinduction_trial_of_all_nonfailure_trials:end);
%             sbv_post=smoothed_b_vals(first_postinduction_trial_of_all_nonfailure_trials:end);
%             for ioioi=1:hy(1,1) 
%                 target(ioioi)=((ioioi-1)*hy(3,1))+hy(2,1);
%                 matches=find(abs(IPIa_post-target(ioioi))<IPI_jitter);
%                 figure(4)
%                 subplot(10,2,[13:2:19])
%                 plot(sov_post(matches),sav_post(matches),'d','Color',zz(ioioi,:))
%                 hold on
%                 figure(9)
%                 subplot(hy(1,1),2,plot_place_post(ioioi))
%                 plot(sov_post(matches),sav_post(matches),'d','Color',zz(ioioi,:))
%                 hold on
%             end
%             figure(4)
%             subplot(10,2,[13:2:19])
%             title('PSCo v PSCa, preinduction squares, postinduction diamonds')
%             xlabel('PSCo'), ylabel('PSCa')
%             set(9,'PaperOrientation','portrait')
%             set(9,'PaperPosition',[0.2500    0.2500    8.0000   10.5000])
%             
%             figure(4)
%             subplot(10,2,[14:2:20])
%             hold on
%             for yoyo=1:hy(1,1)
%                 target(yoyo)=((yoyo-1)*hy(3,1))+hy(2,1);
%                 matches=find(abs(IPIa_vals(1:analyzable_trials_preinduction)-target(yoyo))<IPI_jitter);
%                 plot3(smoothed_o_vals(matches),smoothed_a_vals(matches),smoothed_b_vals(matches),'s','Color',zz(yoyo,:))
%                 hold on
%             end
%             subplot(10,2,[14:2:20])
%             hold on
%             for yoyo=1:hy(1,1) 
%                 target(yoyo)=((yoyo-1)*hy(3,1))+hy(2,1);
%                 matches=find(abs(IPIa_post-target(yoyo))<IPI_jitter);
%                 plot3(sov_post(matches),sav_post(matches),sbv_post(matches),'d','Color',zz(yoyo,:))
%                 hold on
%             end
%             title('PSCo v PSCa v PSCb')
%             xlabel('PSCo'),ylabel('PSCa'),zlabel('PSCb')
%             grid on
%             rotate3d on
%             set(4,'PaperOrientation','portrait');
%             set(4,'PaperPosition',[0.25 0.25 8 9.75]);
%         end
%     end  
% end

%----------------------------------
%a bunch of relevant control plots -- do these whether stim philosophy is 1 or 2
% if (post_processing_mode & trial==number_of_trials) | ~post_processing_mode
        
    
    %colordef(figure(3),'black')
%     persistent bibimbab
% 	persistent shelob
% 	if trial==1 & ishandle(3)
%         a=get(findobj(3,'Type','line'));
%         bibimbab=a(1,1).XData; 
%         figure(3),plot([trial+bibimbab-.5 trial+bibimbab-.5],[2*shelob(1) 0],'r','LineWidth',3)
%     elseif trial==1
%         bibimbab=0; 
%         shelob=[smoothed_o_vals(trial) .9*smoothed_o_vals(trial)];
% 	end
% 	if smoothed_o_vals(trial)<shelob(1),shelob(1)=smoothed_o_vals(trial);end
% 	if smoothed_o_vals(trial)>shelob(2),shelob(2)=smoothed_o_vals(trial);end
	figure(3)
%     mm=shelob
	plot(trial,smoothed_o_vals(trial),'o','MarkerFaceColor','k','MarkerEdgeColor','k','MarkerSize',10), hold on
%	axis([0 trial+bibimbab+1 shelob(1) shelob(2)])
	ylabel('PSCo')
%     h1=gca;
%     h2 = axes('Position',get(h1,'Position'));   %creating the second axes at the same location
%     errorbar(trials_to_current_trial,temperature_mean_vals,temperature_std_vals,'m.')%, axis([0 trial+1 min(temperature_mean_vals) max(temperature_mean_vals)])
%     set(h2,'YAxisLocation','right','Color','none','XTickLabel',[])
%     title(strcat('PSCo\_mam and temperature by trial---',prosslog_name))
%     subplot(2,3,[4:6])
%     errorbar(trials_to_current_trial,temperature_mean_vals,temperature_std_vals,'m.')
%     ylabel('temperature')
%     xlabel('trial')
    
    %can plot the mean PSCo for the first quarter of the experiment v. the last quarter
%     figure(4)
%     if post_processing_mode & trial > 3
%         quarter=floor(length(smoothed_o_vals)/4);  
%         early_mean=mean(smoothed_o_vals(1:quarter));
%         late_mean=mean(smoothed_o_vals(length(smoothed_o_vals)-quarter:length(smoothed_o_vals)));
%         quartile_means=[early_mean late_mean];
%         early_SD=std(smoothed_o_vals(1:quarter));
%         late_SD=std(smoothed_o_vals(length(smoothed_o_vals)-quarter:length(smoothed_o_vals)));
%         quartile_SDs=[early_SD late_SD];
%         xx=[floor(trial/4) ceil((3*trial)/4)];
%         subplot(10,2,[1;3])
%         hold on
%         errorbar(xx,quartile_means,quartile_SDs,'g+')
%     end
    
%     if trial>2
%        a_t_pre=analyzable_trials_preinduction;
%        f_post_t=first_postinduction_trial_of_all_nonfailure_trials;
%        ctrl_panel_dot_size=2;
%        figure(5)
%        clf
%        subplot(8,8,1)
%        plot(trials_to_current_trial(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo')
%        legend('preinduction','postinduction')
%        set(legend,'Position',[.1 .95 .1 .05])
%        subplot(8,8,2)
%        plot(OVSF_presyn_history(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,3)
%        plot(ITI_history(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        title(strcat(prosslog_name,'__control analyses__data from postsynaptic cell'),'FontWeight','bold')
%        subplot(8,8,4)
%        plot(pulse_duration_presyn_history(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,5)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,6)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,7)
%        plot(postsyn_leak_vals(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,8)
%        plot(temperature_mean_vals(1:a_t_pre),smoothed_o_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),smoothed_o_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,9)
%        plot(trials_to_current_trial(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo\_latency')
%        subplot(8,8,10)
%        plot(OVSF_presyn_history(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,11)
%        plot(ITI_history(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,12)
%        plot(pulse_duration_presyn_history(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,13)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,14)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,15)
%        plot(postsyn_leak_vals(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,16)
%        plot(temperature_mean_vals(1:a_t_pre),PSCo_latencies(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),PSCo_latencies(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,17)
%        plot(trials_to_current_trial(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo\_area')
%        subplot(8,8,18)
%        plot(OVSF_presyn_history(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,19)
%        plot(ITI_history(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,20)
%        plot(pulse_duration_presyn_history(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,21)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,22)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,23)
%        plot(postsyn_leak_vals(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,24)
%        plot(temperature_mean_vals(1:a_t_pre),PSCo_area_sum_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),PSCo_area_sum_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,25)
%        plot(trials_to_current_trial(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Total charge')
%        subplot(8,8,26)
%        plot(OVSF_presyn_history(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,27)
%        plot(ITI_history(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,28)
%        plot(pulse_duration_presyn_history(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,29)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,30)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,31)
%        plot(postsyn_leak_vals(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,32)
%        plot(temperature_mean_vals(1:a_t_pre),arrhea_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),arrhea_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,33)
%        plot(trials_to_current_trial(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Leak')
%        subplot(8,8,34)
%        plot(OVSF_presyn_history(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,35)
%        plot(ITI_history(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,36)
%        plot(pulse_duration_presyn_history(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,37)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,38)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,39)
%        plot(postsyn_leak_vals(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,40)
%        plot(temperature_mean_vals(1:a_t_pre),postsyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),postsyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,41)
%        plot(trials_to_current_trial(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('R\_acc')
%        subplot(8,8,42)
%        plot(OVSF_presyn_history(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,43)
%        plot(ITI_history(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,44)
%        plot(pulse_duration_presyn_history(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,45)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,46)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,47)
%        plot(postsyn_leak_vals(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,48)
%        plot(temperature_mean_vals(1:a_t_pre),access_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),access_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        
%        subplot(8,8,49)
%        plot(trials_to_current_trial(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('R\_inp')
%        subplot(8,8,50)
%        plot(OVSF_presyn_history(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,51)
%        plot(ITI_history(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,52)
%        plot(pulse_duration_presyn_history(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,53)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,54)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,55)
%        plot(postsyn_leak_vals(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,56)
%        plot(temperature_mean_vals(1:a_t_pre),input_resistance_postsyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),input_resistance_postsyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%              
%              
%        subplot(8,8,57)
%        plot(trials_to_current_trial(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Temperature')
%        xlabel('Trial')
%        subplot(8,8,58)
%        plot(OVSF_presyn_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_presyn_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Stimulation intensity')
%        subplot(8,8,59)
%        plot(ITI_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('ITI')
%        subplot(8,8,60)
%        plot(pulse_duration_presyn_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_presyn_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Pulse duration')
%        subplot(8,8,61)
%        plot(access_resistance_postsyn_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_postsyn_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('R\_acc')
%        subplot(8,8,62)
%        plot(input_resistance_postsyn_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_postsyn_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('R\_input')
%        subplot(8,8,63)
%        plot(postsyn_leak_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(postsyn_leak_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Leak')
%        subplot(8,8,64)
%        plot(temperature_mean_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Temperature')
%        set(5,'PaperOrientation','landscape');
%        set(5,'PaperPosition',[0.5 0.5 10 7.5]);
%        
%        figure(6)
%        clf
%        subplot(8,8,1)
%        plot(trials_to_current_trial(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo')
%        legend('preinduction','postinduction')
%        set(legend,'Position',[.1 .95 .1 .05])
%        subplot(8,8,2)
%        plot(OVSF_postsyn_history(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,3)
%        plot(ITI_history(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        title(strcat(prosslog_name,'__control analyses__data from presynaptic cell'),'FontWeight','bold')
%        subplot(8,8,4)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,5)
%        plot(access_resistance_presyn_vals(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,6)
%        plot(input_resistance_presyn_vals(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,7)
%        plot(presyn_leak_vals(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,8)
%        plot(temperature_mean_vals(1:a_t_pre),smoothed_o_vals_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),smoothed_o_vals_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,9)
%        plot(trials_to_current_trial(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo\_latency')
%        subplot(8,8,10)
%        plot(OVSF_postsyn_history(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,11)
%        plot(ITI_history(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,12)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,13)
%        plot(access_resistance_presyn_vals(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,14)
%        plot(input_resistance_presyn_vals(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,15)
%        plot(presyn_leak_vals(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,16)
%        plot(temperature_mean_vals(1:a_t_pre),PSCo_latencies_reverse(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),PSCo_latencies_reverse(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,17)
%        plot(trials_to_current_trial(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('PSCo\_area')
%        subplot(8,8,18)
%        plot(OVSF_postsyn_history(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,19)
%        plot(ITI_history(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,20)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,21)
%        plot(access_resistance_presyn_vals(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,22)
%        plot(input_resistance_presyn_vals(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,23)
%        plot(presyn_leak_vals(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,24)
%        plot(temperature_mean_vals(1:a_t_pre),area_one_reverse_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),area_one_reverse_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,25)
%        plot(trials_to_current_trial(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Total charge')
%        subplot(8,8,26)
%        plot(OVSF_postsyn_history(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,27)
%        plot(ITI_history(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,28)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,29)
%        plot(access_resistance_presyn_vals(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,30)
%        plot(input_resistance_presyn_vals(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,31)
%        plot(presyn_leak_vals(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,32)
%        plot(temperature_mean_vals(1:a_t_pre),arrhea_presyn_history(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),arrhea_presyn_history(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,33)
%        plot(trials_to_current_trial(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Leak')
%        subplot(8,8,34)
%        plot(OVSF_postsyn_history(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,35)
%        plot(ITI_history(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,36)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,37)
%        plot(access_resistance_presyn_vals(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,38)
%        plot(input_resistance_presyn_vals(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,39)
%        plot(presyn_leak_vals(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,40)
%        plot(temperature_mean_vals(1:a_t_pre),presyn_leak_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),presyn_leak_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        subplot(8,8,41)
%        plot(trials_to_current_trial(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('R\_acc')
%        subplot(8,8,42)
%        plot(OVSF_postsyn_history(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,43)
%        plot(ITI_history(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,44)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,45)
%        plot(access_resistance_presyn_vals(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,46)
%        plot(input_resistance_presyn_vals(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,47)
%        plot(presyn_leak_vals(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,48)
%        plot(temperature_mean_vals(1:a_t_pre),access_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),access_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        
%        
%        subplot(8,8,49)
%        plot(trials_to_current_trial(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('R\_inp')
%        subplot(8,8,50)
%        plot(OVSF_postsyn_history(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,51)
%        plot(ITI_history(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,52)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,53)
%        plot(access_resistance_presyn_vals(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,54)
%        plot(input_resistance_presyn_vals(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,55)
%        plot(presyn_leak_vals(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        subplot(8,8,56)
%        plot(temperature_mean_vals(1:a_t_pre),input_resistance_presyn_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),input_resistance_presyn_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%              
%              
%        subplot(8,8,57)
%        plot(trials_to_current_trial(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(trials_to_current_trial(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        ylabel('Temperature')
%        xlabel('Trial')
%        subplot(8,8,58)
%        plot(OVSF_postsyn_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(OVSF_postsyn_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Stimulation intensity')
%        subplot(8,8,59)
%        plot(ITI_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(ITI_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('ITI')
%        subplot(8,8,60)
%        plot(pulse_duration_postsyn_history(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(pulse_duration_postsyn_history(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Pulse duration')
%        subplot(8,8,61)
%        plot(access_resistance_presyn_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(access_resistance_presyn_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('R\_acc')
%        subplot(8,8,62)
%        plot(input_resistance_presyn_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(input_resistance_presyn_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('R\_input')
%        subplot(8,8,63)
%        plot(presyn_leak_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(presyn_leak_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Leak')
%        subplot(8,8,64)
%        plot(temperature_mean_vals(1:a_t_pre),temperature_mean_vals(1:a_t_pre),'o','MarkerEdgeColor','k','MarkerFaceColor','none','MarkerSize',ctrl_panel_dot_size),hold on
%        plot(temperature_mean_vals(f_post_t:end),temperature_mean_vals(f_post_t:end),'o','MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',ctrl_panel_dot_size)
%        xlabel('Temperature')
%        set(6,'PaperOrientation','landscape');
%        set(6,'PaperPosition',[0.5 0.5 10 7.5]);
%    end
% end
