Hi guys,
here a small script which should demonstrate the issue.
For the draw option “nostack” I receive the plot with a blue line at 0;
In case of the default draw the line only apears for the parts of the stack greater than 0.
Here it is mentioned that “0” as draw option should be used to remove the line.
Unfortunatelly this didn’t work.
So there are actually two problems:
- how to get rid of the line at 0
- combine 1. with the nostack draw option
Thanks for your help
Christian
{
TH1F* th1 = new TH1F("th1","th1",5,0.5,5.5);
th1->SetLineColor(1);
th1->SetLineWidth(2);
TH1F* th2 = new TH1F("th2","th2",5,0.5,5.5);
th2->SetLineColor(2);
th2->SetLineWidth(2);
th1->Fill(1,1);
th1->Fill(2,-1);
th1->Fill(3,1);
th1->Fill(4,-1);
th1->Fill(5,1);
th2->Fill(1,2);
th2->Fill(2,-2);
th2->Fill(3,2);
th2->Fill(4,-2);
th2->Fill(5,2);
THStack* ths = new THStack();
ths->Add(th1);
ths->Add(th2);
TCanvas* c = new TCanvas("stackTest","stackTest",700,400);
c->cd();
ths->Draw("nostack");
//ths->Draw("");
}