Skip to content
Snippets Groups Projects
Commit 35e6bc6e authored by Tooba Ali's avatar Tooba Ali
Browse files

change text box alignment in truth_reconstruction.py

parent 25ae90f0
No related branches found
No related tags found
1 merge request!205Truth reconstruction error
This commit is part of merge request !205. Comments created here will be created in the context of that merge request.
...@@ -398,13 +398,14 @@ def particle_plots(boolean_particle): ...@@ -398,13 +398,14 @@ def particle_plots(boolean_particle):
ax2.errorbar(-Y_error[1][0], Y_error[1][1], yerr=Y_error[1][3], xerr=Y_error[1][2] ,fmt='None', ecolor = 'orange', elinewidth = 1) ax2.errorbar(-Y_error[1][0], Y_error[1][1], yerr=Y_error[1][3], xerr=Y_error[1][2] ,fmt='None', ecolor = 'orange', elinewidth = 1)
ax3.errorbar(-Y_error[0][0], Y_error[0][1], yerr=Y_error[0][3], xerr=Y_error[0][2] ,fmt='None', ecolor = 'orange', elinewidth = 1) ax3.errorbar(-Y_error[0][0], Y_error[0][1], yerr=Y_error[0][3], xerr=Y_error[0][2] ,fmt='None', ecolor = 'orange', elinewidth = 1)
ax4.errorbar(-Y_error[1][0], Y_error[1][1], yerr=Y_error[1][3], xerr=Y_error[1][2] ,fmt='None', ecolor = 'orange', elinewidth = 1) ax4.errorbar(-Y_error[1][0], Y_error[1][1], yerr=Y_error[1][3], xerr=Y_error[1][2] ,fmt='None', ecolor = 'orange', elinewidth = 1)
y_limits = ax3.get_ylim()
for each_bin in range(len(Y_error[0][0])): for each_bin in range(len(Y_error[0][0])):
if not np.isnan(Y_error[0][1][each_bin]): if not np.isnan(Y_error[0][1][each_bin]):
ax3.text(x=-Y_error[0][0][each_bin]-0.1,y=0 - Y_error[0][4]*50, ax3.text(x=-Y_error[0][0][each_bin],y=y_limits[1],
s= '\u03BC = %.3f\n\u03C3 = %.3f' % (Y_error[0][1][each_bin],Y_error[0][3][each_bin]),size=text_size) s= '\u03BC = %.3f\n\u03C3 = %.3f' % (Y_error[0][1][each_bin],Y_error[0][3][each_bin]),size=text_size,horizontalalignment='center',verticalalignment='top')
if not np.isnan(Y_error[1][1][each_bin]): if not np.isnan(Y_error[1][1][each_bin]):
ax4.text(x=-Y_error[1][0][each_bin]-0.1,y=0 - Y_error[1][4]*50, ax4.text(x=-Y_error[1][0][each_bin],y=y_limits[1],
s= '\u03BC = %.3f\n\u03C3 = %.3f' % (Y_error[1][1][each_bin],Y_error[1][3][each_bin]),size=text_size) s= '\u03BC = %.3f\n\u03C3 = %.3f' % (Y_error[1][1][each_bin],Y_error[1][3][each_bin]),size=text_size,horizontalalignment='center',verticalalignment='top')
if not np.isnan(Y_error[0][4]): if not np.isnan(Y_error[0][4]):
ax1.set_ylim(0-(Y_error[1][4]*10),0+(Y_error[1][4]*10)) ax1.set_ylim(0-(Y_error[1][4]*10),0+(Y_error[1][4]*10))
ax2.set_ylim(0-(Y_error[1][4]*10),0+(Y_error[1][4]*10)) ax2.set_ylim(0-(Y_error[1][4]*10),0+(Y_error[1][4]*10))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment