Re: [ROOT] How to draw a TMarker at a given position

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Tue Apr 13 2004 - 16:01:54 MEST


Hi,
many thanks for your help,
I do need the "cont4", i must use it for the picture.

> To have the marker coordinate in the "CONT4 space" it is a be more tricky.
> You should do something like:
>
> {
> TFile f("hsimple.root");
> hpxpy->Draw("cont4");
> gPad->Update();
> TView *view = gPad->GetView();
> Double_t xyz1[3] = {1.0,3,1.};
> Double_t xyz2[3];
> view->WCtoNDC(xyz1, xyz2);
> TMarker *m = new TMarker(xyz2[0], xyz2[1], 29);
> m->Draw();
> }

I tried your "routine".
It seems to work when both coordinates are linear.
It produces incorrect behavior when they are logarithmic.
Instead of a marker at (1.0, 3.0), I get it at about (0.82, 2.6).

Could you, please, help me,
Thanks in advance,
Best regards,
Jacek.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET