gPad->XtoPad() not working, why?

From: Hans Dembinski <dembinski_at_physik.rwth-aachen.de>
Date: Fri, 10 Aug 2007 15:33:56 +0200


Dear Root Users/Developers,

I have a script which works like this:

  1. Draw a frame histogram, just something to define the axes and the user coordinate system, so that we can nicely overlay our real data on it.

After this step, NDC and user coordinates should be defined!

2) I draw my data into the pad with the frame.

3) I call gPad->Draw(), ->Update(), ->Modified(), whatever and also the TCanvas versions. I tried them all.

Now, the Pad should know its contents!

4) After doing all that, I now need to convert some user coordinates inside the pad into NDC coordinates. I use

my_value_ndc = gPad->XtoPad(my_value);

and it does not work. I just get my old value, so my_value_ndc equals my_value.

Can someone help me understand why this is not working? Or is it a bug?

Best regards,
 Hans

-- 
Dipl.-Phys. Hans Dembinski

Tel.: +49 241 80 27324

III. Phys. Inst. A (3A)
Physikzentrum
RWTH Aachen
52056 Aachen
Received on Fri Aug 10 2007 - 15:39:07 CEST

This archive was generated by hypermail 2.2.0 : Fri Aug 10 2007 - 17:50:02 CEST