Hi Maria,
There are several ways for doing what you request.
I suggest to use TPad::WaitPrimitive. See URL:
http://root.cern.ch/root/htmldoc/TPad.html#TPad:WaitPrimitive
For example, do the following session
root > TCanvas c1;
root > TGraph *gr = (TGraph*)c1.WaitPrimitive("gr","PolyLine");
root > gr->Print();
The second statement (WaitPrimitive above) will wait until you
- have finished entering your points by a double click
- have set the name of the polyline/graph to "gr" by using the context menu
Rene Brun
Maria Marchesini wrote:
>
> I am a new ROOT user and I would like to do something really "silly".
> I have a picture and I would like to read the position of X and Y just
> clicking with the mouse and keeping the results.
> Does anybody know how to do that???
>
> I tryed using the marker and then display the coordinates but I wasn't
> able to store the number and to take other points without resetting
> everything...
>
> Thank you very much,
>
> Maria
>
> ************************************************************************
>
> THE SANDS OF TIME WERE ERODED BY
> THE RIVER OF CONSTANT CHANGE
>
> *************************************************************************
> Maria (Luisa) Marchesini
> Department of Physics & Astronomy Tel: ++44-(0)113-2333872 (work)
> E.C. Stoner Building ++44-(0)113-2496817 (home)
> University of Leeds
> Woodhouse Lane LS2 9JT e-mail: mm@ast.leeds.ac.uk
> Leeds (U.K.)
> *************************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:06 MET