2222# how many histograms to draw in multi-hist plots
2323N_HISTS = 8 # exhibits all the colors in the Okabe-Ito cycler
2424
25+ dunestyle .OffWhiteBackground ()
26+
2527### 1D histogram example ###
2628def Hist1D (pdf ):
2729 x = np .random .normal (0 , 1 , 1000 )
@@ -103,7 +105,7 @@ def DataMC(pdf):
103105 transform = axs [0 ].transAxes )
104106
105107 fontdict = {"size" : 14 }
106- axs [0 ].text (0.68 , 0.52 , 'A = {0:0.2f}$\pm${1:0.2f}' .format (A , dA ),
108+ axs [0 ].text (0.68 , 0.52 , r 'A = {0:0.2f}$\pm${1:0.2f}' .format (A , dA ),
107109 fontdict = fontdict ,
108110 transform = axs [0 ].transAxes )
109111 axs [0 ].text (0.68 , 0.46 , r'$\mu$ = {0:0.2f}$\pm${1:0.2f}' .format (x0 , dx0 ),
@@ -112,7 +114,7 @@ def DataMC(pdf):
112114 axs [0 ].text (0.68 , 0.40 , r'$\sigma$ = {0:0.2f}$\pm${1:0.2f}' .format (sig , dsig ),
113115 fontdict = fontdict ,
114116 transform = axs [0 ].transAxes )
115- axs [0 ].text (0.68 , 0.34 , '$\chi^2$/ndof = {0:0.2f}/{1:d}' .format (chi2 , ndf ),
117+ axs [0 ].text (0.68 , 0.34 , r '$\chi^2$/ndof = {0:0.2f}/{1:d}' .format (chi2 , ndf ),
116118 fontdict = fontdict ,
117119 transform = axs [0 ].transAxes )
118120 axs [0 ].legend (fontsize = "xx-large" ) # since the upper panel is only 70% of the whole canvas, the legend is (by default) too small
0 commit comments