del Q_vs_M_Q_14_21 #erase Q_vs_M_Q_14_21 (is an object) ############################################################### Q measured histograms ######################################### ################################################################## 14 degrees Q_measured_14 = Plotter([data_14_degrees['Q'][condition_mass_14] ]) #Create the base with the variables in a object Q_measured_14.SetFigSize(12, 7) Q_measured_14.SetBinX(400) Q_measured_14.SetFigTitle( r'$Q^{m}$ $\equiv$ Q = $\frac{A}{(A/Q)}$ 14$\degree$', 20) Q_measured_14.SetLabelX('Q', 20) Q_measured_14.SetLabelY('counts', 20) Q_measured_14.SetBoxText( 'Selection:\n Z>0 \n Zi>0 \n 70<M<180 \n 2.25<M_Q<4 \n -100<Pf<100 \n -110<Yf<50 \n Xf>-1500' ) Q_measured_14.Histo_1D() #Draw it ######### Save and show the created figure Q_measured_14.SetOutDir(basepath + 'Modules/' + MODULE_name + '/Outputfiles/Figures/Q_analysis/') Q_measured_14.SaveFig('Q_measured_14') Q_measured_14.Show(1) #show during 1 seconds, the close authomatically Q_measured_14.Close() #close all windows, axes and figures running backend del Q_measured_14 #erase Q_measured_14 (is an object) ################################################################## 21 degrees Q_measured_21 = Plotter([data_21_degrees['Q'][condition_mass_21] ]) #Create the base with the variables in a object Q_measured_21.SetFigSize(12, 7) Q_measured_21.SetBinX(400) Q_measured_21.SetFigTitle( r'$Q^{m}$ $\equiv$ Q = $\frac{A}{(A/Q)}$ 21$\degree$', 20)
''' ################################################ Histo_1D() function ########################################################################################## Histo1D_object = Plotter([ Testing_data_hdf5['Brho'][()] ]) #Create the base with the variables in a Histo1D_object) ######### Some options Histo1D_object.SetFigSize(10, 7) Histo1D_object.SetBinX(100) Histo1D_object.SetFigTitle('Variable 1 histogram 1D', 20) Histo1D_object.SetLimX((0.0, 2.0)) Histo1D_object.SetLabelX('Variable 1', 15) ######### Generate the histogram Histo1D_object.Histo_1D() ######### Save and show the created figure Histo1D_object.SetOutDir(basepath + 'Modules/' + MODULE_name + '/Outputfiles/Figures/') Histo1D_object.SaveFig('figure_TEST_Histo1D') Histo1D_object.Show( 1 ) #show during 1 seconds, then close authomatically. Leave empty for normal plt.show() Histo1D_object.Close() #close all windows, axes and figures running backend del Histo1D_object #erase Histo1D_object ################################################ Bar_diagram() function ######################################################################################### Bar_diagram_object = Plotter( [['a', 'e', 'i', 'o', 'u'], [4, 3, 3, 4, 7]]) #Create the base with (tags, frequency) respectively