Replacing "Events" in y-axis labels of my RooPlots


when plotting the content of RooDatasets, I am always getting the y-axis labeled as “Events / (XXX xxx)”, where XXX is the x-axis bin width and xxx the corresponding unit. Using “Events” for these labels might be a good default. There are many cases, however, where the entries are not events but, for example, reconstructed objects and there could be several entries of such objects per “event”. In consequence, the default labels can be misleading. Of course, I could modify the label afterwards like:

myRooPlot->GetYaxis()->SetTitle(“Entries / (2.5 cm)”);

But then I will also have to make sure to use the correct bin width and unit in each case, so I wondered whether there is a simpler, more elegant and direct way of changing the “Events” in the y-axis to something else for my plots…?


Did it solve ? I also want to change the Y axis name manually ? But, could not sort this out.

Hi @souvik,
note that this was a post from 2011. Solutions might or might not apply. Please create a new topic to discuss your current problem :smiley: