Re: tooltip for individual TGraph points

From: Barna Daniel <daniel.barna_at_cern.ch>
Date: Thu, 29 Oct 2009 10:12:29 +0100


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:12:33 CET

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