forgotten bin

From: Stefan Stonjek (stonjek@mail.desy.de)
Date: Thu Oct 21 1999 - 17:10:13 MEST


Hello Root Users,

I have a strange Problem with the new version 2.23/04. This version seems
to forget to plot the last bin. Here comes an example. It works fine with
version 2.00/13.

------------------------------------------------------------------------
{

// This macro forgets the last bin with ROOT Version 2.23/04 (13 October 1999)

  gROOT->Reset();    
  gROOT->SetStyle("Plain");
  gStyle->SetFrameBorderMode(0);
  gStyle->SetOptDate(1);
  gStyle->SetOptStat(000000);

  Axis_t bins[5] = { 0.12 , 0.16 , 0.2 , 0.25 , 1.0 } ;

  TH1F *histo_1 = new TH1F("histo_1","Histogram 1",4,bins);
        histo_1->Sumw2();
  TH1F *histo_2 = new TH1F("histo_2","Histogram 2",4,bins);
        histo_2->Sumw2();

  TCanvas *c1 = new TCanvas("c1","Page 1",800,600);
  c1->Clear();

  histo_1->SetBinContent(1,198);
  histo_1->SetBinError(1,10);
  histo_1->SetBinContent(2,211);
  histo_1->SetBinError(2,10);
  histo_1->SetBinContent(3,191);
  histo_1->SetBinError(3,10);
  histo_1->SetBinContent(4,181);
  histo_1->SetBinError(4,10);

  histo_2->SetBinContent(1,128);
  histo_2->SetBinError(1,10);
  histo_2->SetBinContent(2,231);
  histo_2->SetBinError(2,10);
  histo_2->SetBinContent(3,141);
  histo_2->SetBinError(3,10);
  histo_2->SetBinContent(4,151);
  histo_2->SetBinError(4,10);

  histo_2.SetTitle("Maybe I forgot something");
  histo_2.SetMarkerStyle(25);
  histo_2.Draw("E");
  histo_1.SetMarkerStyle(24);
  histo_1.Draw("Esame");

  c1->Update();

}
------------------------------------------------------------------------

I have no idea what causes this effect.

Tschuess
	Stefan

*********      Stefan  Stonjek     *********
*****            DESY / ZEUS           *****
*****      Stefan.Stonjek@desy.de      *****
*********  Tel.: +49-40-8998-3159  *********



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:41 MET