Vertical (horizontal) cursor

Dear rooters,

I am doing some analysis that makes me compare similar histograms obtained with
different conditions.
Visually I put them in a same column using the Divide() canvas command. This works
perfectly.
However, I would like to have a ‘precision’ tool like a vertical (or horizontal) cursor that
expand across all the canvas in order to guide the eyes (see attached picture for iluustration).
I went through all the forum without finding anything close to this. Is there a (simple or
complex) way to do it ?

Regards
Julien


Hi Julien,

You can use the method TPad::SetCrosshair ( see for more details at root.cern.ch/root/htmldoc/TPad.h … tCrosshair ).

This method is available via the user interface in the canvas and can be seen on the image at root.cern.ch/root/htmldoc/TPadEditor.html ). You can select View menu / Editor to open the editor pane on the left; click on the canvas object (TCanvas) to load related interface and select/unselect the Crosshair check button when you need.

Cheers, Ilka

Dear Ilka,

Thank you for pointing me this function I missed.
It works perfectly.

Regards
Julien