Re: basic lines to show cut points

From: Paul Seyfert <Paul.Seyfert_at_cern.ch>
Date: Thu, 2 Sep 2010 09:10:23 +0200


Hi,

for the lines, I would create a TLine with TLine* cut1 = new TLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)

and then draw it onto the same pad as the histogram:

hist->Draw();
cut1->Draw("same");

I guess with arrows it's the same way.

Cheers,
Paul

Reference of TLine: http://root.cern.ch/root/html/TLine.html

Mario Kadastik schrieb:
> Hello,
>
> out of curiosity, how could I easily overlay histograms with lines/arrows at the points where I cut for illustrative purposes. Would be curious about arrows for 1D histograms and lines for 2D histograms. For example let's say I have a 2D plot showing m1 vs m2 and I want to highlight the region which is +- 20 units from the diagonal (highlight with shading or lines parallel to diagonal or ...). Would be especially good if those would scale and zoom along with the histogram itself so their positioning is fixed to the bin location etc.
>
> Thanks,
>
> Mario Kadastik, PhD
> Researcher
>
> ---
> "Physics is like sex, sure it may have practical reasons, but that's not why we do it"
> -- Richard P. Feynman
Received on Thu Sep 02 2010 - 09:11:31 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 02 2010 - 11:50:01 CEST