I have to draw 13 different histograms, and I want to change the line color and put the fill color transparent. I have tried to do these things using SetFillColor and SetLine Color, but it doesn’t work. Here it is my code:
TH1F *h1 = new TH1F("hist","Dose totale",80,0,20);
TH1F *h2 = new TH1F("hist","Dose gamma",80,0,20);
TH1F *h3 = new TH1F("hist","Dose e-",80,0,20);
TH1F *h4 = new TH1F("hist","Dose e+",80,0,20);
TH1F *h5 = new TH1F("hist","Dose neutroni",80,0,20);
TH1F *h6 = new TH1F("hist","Dose protoni",80,0,20);
TH1F *h7 = new TH1F("hist","Dose deuterio",80,0,20);
TH1F *h8 = new TH1F("hist","Dose alfa",80,0,20);
TH1F *h9 = new TH1F("hist","Dose Li7",80,0,20);
TH1F *h10 = new TH1F("hist","Dose C14",80,0,20);
TH1F *h11 = new TH1F("hist","Dose N14",80,0,20);
TH1F *h12 = new TH1F("hist","Dose O16",80,0,20);
TH1F *h13 = new TH1F("hist","Dose O17",80,0,20);
int a = 1;
while (file >> i >> j >> k >> dose >> gamma >> gamma_f >> emeno >> emeno_f >> epiu >> epiu_f >> neutron_1 >> neutron_1_f >> proton >> proton_f >> deuteron >> deuteron_f >> alpha >> alpha_f >> li7 >> li7_f >> c14 >> c14_f >> n14 >> n14_f >> o16 >> o16_f >> o17 >> o17_f )
{
cout << i << " " << dose << " " << gamma << " " << emeno << " " << epiu << " " << neutron_1 << " " << proton << " " << deuteron << " " << alpha << " " << li7 << " " << c14 << " " << n14 << " " << o16 << " " << o17 << endl;
h1->SetBinContent(a++,dose);
h2->SetBinContent(a++,gamma);
h3->SetBinContent(a++,emeno);
h4->SetBinContent(a++,epiu);
h5->SetBinContent(a++,neutron_1);
h6->SetBinContent(a++,proton);
h7->SetBinContent(a++,deuteron);
h8->SetBinContent(a++,alpha);
h9->SetBinContent(a++,li7);
h10->SetBinContent(a++,c14);
h11->SetBinContent(a++,n14);
h12->SetBinContent(a++,o16);
h13->SetBinContent(a++,o17);
}
file.close();
h1->GetXaxis()->SetTitle("Depth(cm)");
h1->GetYaxis()->SetTitle("Dose");
h2->GetXaxis()->SetTitle("Depth(cm)");
h2->GetYaxis()->SetTitle("Dose");
h3->GetXaxis()->SetTitle("Depth(cm)");
h3->GetYaxis()->SetTitle("Dose");
h4->GetXaxis()->SetTitle("Depth(cm)");
h4->GetYaxis()->SetTitle("Dose");
h5->GetXaxis()->SetTitle("Depth(cm)");
h5->GetYaxis()->SetTitle("Dose");
h6->GetXaxis()->SetTitle("Depth(cm)");
h6->GetYaxis()->SetTitle("Dose");
h7->GetXaxis()->SetTitle("Depth(cm)");
h7->GetYaxis()->SetTitle("Dose");
h8->GetXaxis()->SetTitle("Depth(cm)");
h8->GetYaxis()->SetTitle("Dose");
h9->GetXaxis()->SetTitle("Depth(cm)");
h9->GetYaxis()->SetTitle("Dose");
h10->GetXaxis()->SetTitle("Depth(cm)");
h10->GetYaxis()->SetTitle("Dose");
h11->GetXaxis()->SetTitle("Depth(cm)");
h11->GetYaxis()->SetTitle("Dose");
h12->GetXaxis()->SetTitle("Depth(cm)");
h12->GetYaxis()->SetTitle("Dose");
h13->GetXaxis()->SetTitle("Depth(cm)");
h13->GetYaxis()->SetTitle("Dose");