Hello,
i have a TH2D, 5x5 plotting in lego. I would like to be able to message
individual bins (columns) to make them different colours.
Here is the code i have to make it so far, can you suggest how i might
modify it?
//make it:
TH2D *XtalsLego=new TH2D("energy In 25 xtals for all events","Matrix of 25
Xtals, normed Log En deposited",5,0,5,5,0,5);
//fill it:
for (int i=1;i<6;i++){for (int j=1;j<6;j++){
Float_t xXtal=i-0.5;
Float_t yXtal=j-0.5;
int myIndex=j+2+(i+1)*10;
Double_t someEn=energyDeposited[myIndex]+this->Noise();
XtalsLego->Fill(xXtal,yXtal,someLogEn);
}}
//draw it:
TCanvas *myCanv=new TCanvas("big dog ","EnDep in 25 Xtals",1);
myCanv->SetFillColor(42);
gStyle->SetFrameFillColor(40);
XtalsLego->SetFillColor(38);
XtalsLego->Draw("lego1");
--
CMS-Bristol
http://cern.ch/dan.holmes
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET