RE: tooltip for individual TGraph points

From: Bertrand Bellenot <Bertrand.Bellenot_at_cern.ch>
Date: Thu, 29 Oct 2009 10:21:58 +0100


Hi,

Tooltips are already implemented in TCanvas, just select "Tooltip Info" in the "View" menu of the canvas.
I'm checking now if you can use this to display your own information.

Cheers, Bertrand.

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Olivier Couet
Sent: Thursday, October 29, 2009 10:16
To: Dani Barna; Andreas Mussgiller
Cc: roottalk_at_root.cern.ch
Subject: RE: [ROOT] tooltip for individual TGraph points

Hi,
Yes that would be nice to see/have. And if it is general enough we can include it in the standard ROOT.
Cheers,
Olivier

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Barna Daniel
Sent: Thursday, October 29, 2009 10:12 AM To: Andreas Mussgiller
Cc: roottalk_at_root.cern.ch
Subject: Re: [ROOT] tooltip for individual TGraph points

Hi,
Thanks. If you could send the source file, to have a working example, I would be very grateful.
Thank you
Daniel

On Thu, 29 Oct 2009, Andreas Mussgiller wrote:

> Hi,
>
> I implemented a similar thing for a simple event display a while back.
> I used a TEmbeddedCanvas in a GUI and reimplemented the
> DistancetoPrimitive(Int_t px, Int_t py) method of the objects I draw
on
> the canvas. In your case this would be TGraph and TGraphErrors.
> In the method I transform the local coordinates px and py to global
> ones and display the tooltip with the information I want.
> This should probably also work with a regular TCanvas without an
> additional GUI around it.
>
> Ciao
> Andreas
>
> On Thursday 29 October 2009 02:41:21 Barna Daniel wrote:
>> Hi,
>>
>> We dump our experimental data into an ntuple for quick visualization.
Each
>> entry in the ntuple corresponds to one shot, and we have several data
>> associated with each shot: shot_number:data1:data2:data3:... etc
>>
>> If we plot for example data1:data2, and we see a suspicious bad
point, it
>> is difficult to trace back, what is the shot_number of this point
(write
>> conditions, etc). The visualization is through a TGraph or
TGraphErrors.
>>
>> It would be nice, if each point of a TGraph could have a tooltip,
which
>> I would set to the shot_number, so that if I bring the pointer over
this
>> datapoint, the shot_number is visible. Is it possible somehow?
>>
>> Thanksk
>
Received on Thu Oct 29 2009 - 10:22:03 CET

This archive was generated by hypermail 2.2.0 : Thu Oct 29 2009 - 11:50:02 CET