[ROOT] Update of a zoomed histogram

From: Reiner Rohlfs (Reiner.Rohlfs@obs.unige.ch)
Date: Wed Feb 07 2001 - 16:07:05 MET


Hi ROOTteam,

To change the number of bins of a histogram that is zoomed gives strange
result:

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.00/02   18 January 2001   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

CINT/ROOT C/C++ Interpreter version 5.14.70, Jan 16 2001
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0]    c1 = new TCanvas("c1","X - Zoom",700,500);          
root [1]    TH1F * histo = new TH1F("h1", "zoom test", 5, 0, 4);
root [2]    histo->Fill(0.5, 4);                                
root [3]    histo->Fill(2.5, 8);                                
root [4]    histo->Fill(3.5, 10);                               
root [5]    histo->Draw();  

now the user zooms the X - axis with the mouse
                                    
root [6] histo->SetBins(7, 0, 6);                                
root [7] histo->Draw();                                          


It works perfect if the histogram is not zoomed.


Thanks Reiner.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET