RE: Zooming two histograms in sync

From: Anton Fokin (fokin@tsl.uu.se)
Date: Sun Feb 27 2000 - 12:39:49 MET


Rene,

I meant two pads and mouse zoom. Of course it is trivial to do in the solid
code :) The problem is that I have checked zooming in root and do not see a
straightforward way to catch a mouse zoom event and use it to zoom the
second histogram.

-----Original Message-----
From: Rene Brun [mailto:brun@pcbrun.cern.ch]
Sent: Sunday, February 27, 2000 9:38 AM
To: Anton Fokin
Cc: Rene Brun; roottalk@pcroot.cern.ch
Subject: Re: Zooming two histograms in sync


Anton,

Assume TH1 *h1 in TPad *pad1 and h2 in pad2, do
   h1->GetXaxis()->SetRange(firstbin,lastbin); pad1->Modified();
   h2->GetXaxis()->SetRange(firstbin,lastbin); pad2->Modified();
   canvas->Update();

Rene Brun


On Sat, 26 Feb 2000, Anton Fokin wrote:

> Hi rooters,
>
> I have two histograms in two pads in a canvas and I zoom histograms in
sync,
> i.e. if I zoom the upper one, the lower one should also zoom to the same
> range. (Imagine how it is important for time series applications). What is
> the best way to implement it?
>
> Best regards,
> Anton
>
>



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET