diff --git a/docs/appendix/yaml.rst b/docs/appendix/yaml.rst index 5f1f3030..5dc2996f 100644 --- a/docs/appendix/yaml.rst +++ b/docs/appendix/yaml.rst @@ -351,6 +351,8 @@ for csi plot, list of model names (only) user choose to set as labels. **score_name:** csi plot only. list of scores user can choose to plot. examples are "Critical Success Index' 'False Alarm Rate' 'Hit Rate'. +**threshold_tick_style:** csi plot only. (optional) control for spacing of threshold (x-axis) ticks. example: use ``unique`` when a unique xtick for each threshold value is desired. Any other selection (default = None) will choose xticks that are equally spaced between min(threshold_list):max(threshold_list). + **data:** This a list of model / observation pairs to be plotted where the observation label is first and the model label is second (e.g., ['airnow_cmaq_expt', 'airnow_rrfs_13km', 'airnow_wrfchem_v4.2']) diff --git a/melodies_monet/driver.py b/melodies_monet/driver.py index 5773ff52..543b470f 100644 --- a/melodies_monet/driver.py +++ b/melodies_monet/driver.py @@ -1502,7 +1502,7 @@ def plotting(self): threshold_list = grp_dict['threshold_list'] score_name = grp_dict['score_name'] model_name_list = grp_dict['model_name_list'] - xtick_style = grp_dict.get('xtick_style',None) + threshold_tick_style = grp_dict.get('threshold_tick_style',None) # first get the observational obs labels pair1 = self.paired[list(self.paired.keys())[0]] @@ -2394,7 +2394,7 @@ def plotting(self): domain_type=domain_type, domain_name=domain_name, model_name_list=model_name_list, - xtick_style=xtick_style) + threshold_tick_style=threshold_tick_style) #save figure plt.tight_layout() savefig(outname +'.'+score_name+'.png', loc=1, logo_height=100) diff --git a/melodies_monet/plots/surfplots.py b/melodies_monet/plots/surfplots.py index 2dcb6c34..11110697 100755 --- a/melodies_monet/plots/surfplots.py +++ b/melodies_monet/plots/surfplots.py @@ -1534,7 +1534,7 @@ def Calc_Score(score_name_input,threshold_input, model_input, obs_input): return output_score -def Plot_CSI(score_name_input,threshold_list_input, comb_bx_input,plot_dict,fig_dict,text_dict,domain_type,domain_name,model_name_list,xtick_style): +def Plot_CSI(score_name_input,threshold_list_input, comb_bx_input,plot_dict,fig_dict,text_dict,domain_type,domain_name,model_name_list,threshold_tick_style): CSI_output = [] #(2, threshold len) threshold_list = threshold_list_input @@ -1566,7 +1566,7 @@ def Plot_CSI(score_name_input,threshold_list_input, comb_bx_input,plot_dict,fig_ #Make Plot for i in range(len(CSI_output)): - if xtick_style == 'equal': + if threshold_tick_style == 'unique': plt.plot(range(len(threshold_list)),CSI_output[i],'-*',label=model_name_list[i]) else: plt.plot(threshold_list,CSI_output[i],'-*',label=model_name_list[i]) @@ -1578,7 +1578,7 @@ def Plot_CSI(score_name_input,threshold_list_input, comb_bx_input,plot_dict,fig_ plt.grid() #add '>' to xticks - if xtick_style == 'equal': + if threshold_tick_style == 'unique': threshold_string_array = [str(x) for x in threshold_list] labels = ['>'+item for item in threshold_string_array] ax.set_xticks(range(len(threshold_list)),labels=labels)