Drawing Arrow on histogram

Dear Experts,

I plotting fom vs cut value by using TGraph. Here I am reading fom values and cut values from text file and plotting by using TGraph. I want to draw one arrow at the cut value where the fom value is maximum(which I can know from the text file). Could somebody suggest me how to do it?

Thanks,
Deepak

https://root.cern/doc/master/classTArrow.html

Dear Couet,

I want to draw the arrow at a particular cutvalue.

Thanks,
Deepak

Hi,

as Olivier wrote, the information about TArrow can be found in the regular ROOT documentation.
If you want an example you can look at the ROOT primer notebooks: http://swan.web.cern.ch/content/root-primer and in particular http://nbviewer.jupyter.org/github/root-project/training/blob/master/2017/examples/notebooks/Macro1_cpp.ipynb

Cheers,
D

Dear Experts,

I have attached the plot.I want to draw an arrow at Bs cosalpha in 2d = 0.9992, to show the fom value for this Bs cosalpha in 2d value. Could you please tell me how to draw?

Thanks,
Deepak

You can draw a TArrow using the axis coordinates of your plot. Simply compute the TArrow position, pass them to the TArrow constructor and draw the TArrow using the Draw() method. As in the example Danilo mentionned.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.