Skip to content

Commit

Permalink
change yaml option from unique to nonlinear
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanschnell committed Nov 18, 2024
1 parent 3cf9ebe commit f756ec9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/appendix/yaml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ 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).
**threshold_tick_style:** csi plot only. (optional) control for spacing of threshold (x-axis) ticks. example: use ``nonlinear`` when nonlinear xticks are 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
Expand Down
4 changes: 2 additions & 2 deletions melodies_monet/plots/surfplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 threshold_tick_style == 'unique':
if threshold_tick_style == 'nonlinear':
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])
Expand All @@ -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 threshold_tick_style == 'unique':
if threshold_tick_style == 'nonlinear':
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)
Expand Down

0 comments on commit f756ec9

Please sign in to comment.