diff --git a/tools/plotting/fastnnlo_scaleclosure.py b/tools/plotting/fastnnlo_scaleclosure.py index 82e80903c7c9330760327d662659095aff1725fe..deddd1711b870d1f9d4c0770c2d7b8ee7c6f81b9 100755 --- a/tools/plotting/fastnnlo_scaleclosure.py +++ b/tools/plotting/fastnnlo_scaleclosure.py @@ -394,8 +394,9 @@ a_fl2nn = np.divide(xs_fnll-xs_nnlo, xs_fnll+xs_nnlo, # Rel. stat. uncertainty from NNLOJET dst_nnlo = np.divide(dxs_nnlo, xs_nnlo, out=np.ones_like(dxs_nnlo), where=xs_nnlo != 0) -dr_fl2nn = dstat*np.multiply(r_fl2nn, dst_nnlo) -da_fl2nn = dstat*np.multiply(a_fl2nn, dst_nnlo) +# errorbar yerr needs to be always positive in the new matplotlib versions +dr_fl2nn = np.abs(dstat*np.multiply(r_fl2nn, dst_nnlo)) +da_fl2nn = np.abs(dstat*np.multiply(a_fl2nn, dst_nnlo)) # Prepare plotting titwgt = 'bold' diff --git a/tools/plotting/fastnnlo_statunc.py b/tools/plotting/fastnnlo_statunc.py index 2b94f5dd8daa1979369f6e4fa7e88715a47de5a6..4b4bf3fa60d49f145a68db710f9aa4a33e771242 100755 --- a/tools/plotting/fastnnlo_statunc.py +++ b/tools/plotting/fastnnlo_statunc.py @@ -132,8 +132,10 @@ def plotting(x_axis, xmin, xmax, dxsr_ch, dxsr_or, xlabel, ylabel, title, tablen ax1 = plt.subplot(gs[0, :]) ax1.set_autoscalex_on(True) plt.setp(ax1.get_xticklabels(), visible=True) - ax1.set_xscale('log', nonposx='clip') - ax1.set_yscale('log', nonposy='clip') + # ax1.set_xscale('log', nonposx='clip') # Will become nonpositive= in matplotlib 3.3.x + # ax1.set_yscale('log', nonposy='clip') # Will become nonpositive= in matplotlib 3.3.x + ax1.set_xscale('log', nonpositive='clip') + ax1.set_yscale('log', nonpositive='clip') ax1.set_ylim(0.00001, 0.1) ax1.set_xlabel(r'%s' %xlabel, horizontalalignment='right', x=1.0, verticalalignment='top', y=1.0) ax1.set_ylabel(r'%s(%s)' % (ylabel, order), horizontalalignment='right', x=1.0, @@ -178,7 +180,8 @@ def plotting(x_axis, xmin, xmax, dxsr_ch, dxsr_or, xlabel, ylabel, title, tablen ax2 = plt.subplot(gs2[0, :]) ax2.set_autoscalex_on(True) plt.setp(ax2.get_xticklabels(), visible=True) - ax2.set_xscale('log', nonposx='clip') + # ax2.set_xscale('log', nonposx='clip') # Will become nonpositive= in matplotlib 3.3.x + ax2.set_xscale('log', nonpositive='clip') ax2.set_ylim(-1.0, 1.5) ax2.set_xlabel(r'%s' %xlabel, horizontalalignment='right', x=1.0, verticalalignment='top', y=1.0) ax2.set_ylabel(r'%s(%s)' % (ylabel2, order), horizontalalignment='right', x=1.0,