@@ -846,14 +846,14 @@ def multiROCCurveGrey(
846
846
847
847
848
848
th_colours = [
849
- # "#36213E",
849
+ "#36213E" ,
850
850
# "#9381FF",
851
851
"#1f78b4" ,
852
- # "#a6cee3",
852
+ "#a6cee3" ,
853
853
# "#32965D",
854
854
"#7CB518" ,
855
855
"#EDB458" ,
856
- # "#ff7f00",
856
+ "#ff7f00" ,
857
857
"#a70000" ,
858
858
]
859
859
@@ -870,14 +870,19 @@ def multiROCCurve(
870
870
plot_dir = "" ,
871
871
name = "" ,
872
872
prelim = True ,
873
+ lumi = None ,
873
874
show = False ,
874
875
):
875
876
if ylim is None :
876
877
ylim = [1e-06 , 1 ]
877
878
if xlim is None :
878
879
xlim = [0 , 1 ]
879
880
if thresholds is None :
880
- thresholds = [[0.9 , 0.98 , 0.995 , 0.9965 , 0.998 ], [0.99 , 0.997 , 0.998 , 0.999 , 0.9997 ]]
881
+ thresholds = [
882
+ 0.9 ,
883
+ 0.99 ,
884
+ 0.998 ,
885
+ ] # [0.9, 0.98, 0.995, 0.9965, 0.998] # [[0.99, 0.997, 0.998, 0.999, 0.9997]]
881
886
882
887
plt .rcParams .update ({"font.size" : 32 })
883
888
@@ -897,13 +902,12 @@ def multiROCCurve(
897
902
color = COLOURS [ROC_COLOURS [i * len (roc_sigs ) + j ]],
898
903
linestyle = LINESTYLES [i * len (roc_sigs ) + j ],
899
904
)
900
-
901
905
pths = {th : [[], []] for th in pthresholds }
902
906
for th in pthresholds :
903
907
idx = _find_nearest (roc ["thresholds" ], th )
904
908
pths [th ][0 ].append (roc ["tpr" ][idx ])
905
909
pths [th ][1 ].append (roc ["fpr" ][idx ])
906
- print (roc ["tpr" ][idx ])
910
+ # print(roc["tpr"][idx])
907
911
908
912
for k , th in enumerate (pthresholds ):
909
913
ax .scatter (
@@ -935,7 +939,15 @@ def multiROCCurve(
935
939
alpha = 0.5 ,
936
940
)
937
941
938
- add_cms_label (ax , year , data = False , label = "Preliminary" if prelim else None , loc = 1 , lumi = False )
942
+ hep .cms .label (
943
+ ax = ax ,
944
+ label = "Preliminary" if prelim else "" ,
945
+ data = True ,
946
+ year = year ,
947
+ com = "13.6" ,
948
+ fontsize = 20 ,
949
+ lumi = lumi ,
950
+ )
939
951
940
952
if log :
941
953
plt .yscale ("log" )
@@ -944,16 +956,16 @@ def multiROCCurve(
944
956
ax .set_ylabel ("Background efficiency" )
945
957
ax .set_xlim (* xlim )
946
958
ax .set_ylim (* ylim )
947
- ax .legend (loc = "lower right" , fontsize = 24 )
959
+ ax .legend (loc = "lower right" , fontsize = 21 )
948
960
949
961
if title :
950
962
ax .text (
951
- 0.05 ,
952
- 0.83 ,
963
+ 0.02 ,
964
+ 0.93 ,
953
965
title ,
954
966
transform = ax .transAxes ,
955
- fontsize = 24 ,
956
- fontproperties = "Tex Gyre Heros:bold" ,
967
+ fontsize = 20 ,
968
+ # fontproperties="Tex Gyre Heros:bold",
957
969
)
958
970
959
971
if kin_label :
@@ -968,6 +980,7 @@ def multiROCCurve(
968
980
969
981
if len (name ):
970
982
plt .savefig (f"{ plot_dir } /{ name } .pdf" , bbox_inches = "tight" )
983
+ plt .savefig (f"{ plot_dir } /{ name } .png" , bbox_inches = "tight" )
971
984
972
985
if show :
973
986
plt .show ()
0 commit comments