Very Poor Quality PDF exports

Hi everyone! I am fairly new to Root, and I am having a problem with (VERY) poor pdf quality exports. Below is my simple code to plot 6 histograms cd’ed onto one canvas. The problem did not happen at all until I added the error bars, then the pdf quality went to 0. It looks very bad, much much much worse than even the .png export. Below is my code, and I have attached first a screenshot of the canvas, then the .png output, and then the .pdf output

[code]
TTree * ttree = (TTree * )f->Get(“ttree”);

ttree->SetBranchAddress("tm",&tm);
ttree->SetBranchAddress("tp",&tp);
ttree->SetBranchAddress("tpt",&tpt);
ttree->SetBranchAddress("te",&te);
ttree->SetBranchAddress("tet",&tet);
ttree->SetBranchAddress("teta",&teta);
ttree->SetBranchAddress("tphi",&tphi);
ttree->SetBranchAddress("tweight1",&tweight1);
ttree->SetBranchAddress("tstatus", &tstatus);

TCanvas * cant = new TCanvas("cant","cant",0,0,1800,800);

	TH1D * htp = new TH1D("htp","htp",sqrt(ttree->GetEntries()),floor(ttree->GetMinimum("tp")),ceil(ttree->GetMaximum("tp")));
TH1D * htpt = new TH1D("htpt","htpt",sqrt(ttree->GetEntries()), floor(ttree->GetMinimum("tpt")),ceil(ttree->GetMaximum("tpt")));
TH1D * hte = new TH1D("hte","hte",sqrt(ttree->GetEntries()),floor(ttree->GetMinimum("te")),ceil(ttree->GetMaximum("te")));
TH1D * htet = new TH1D("htet","htet",sqrt(ttree->GetEntries()),floor(ttree->GetMinimum("tet")),ceil(ttree->GetMaximum("tet")));
TH1D * hteta = new TH1D("hteta","hteta",sqrt(ttree->GetEntries()),-8,8);
TH1D * htphi = new TH1D("htphi","htphi",sqrt(ttree->GetEntries()),-3,3);

htp->Sumw2(); 
htpt->Sumw2();
hte->Sumw2();
htet->Sumw2();
hteta->Sumw2();
htphi->Sumw2();

for(Long64_t i = 0; i < ttree->GetEntries(); i++) {   
	ttree->GetEntry(i);
	if(tstatus == 1) {
	htp->Fill(tp,tweight1);
	htpt->Fill(tpt,tweight1);
	hte->Fill(te,tweight1);
	htet->Fill(tet,tweight1);
	hteta->Fill(teta,tweight1);
	htphi->Fill(tphi,tweight1);
}
}

TH1D * htpt2 = (TH1D*)htpt->Clone("htpt_errors"); 
TH1D * htp2 = (TH1D*)htp->Clone("htp_errors");
TH1D * htet2 = (TH1D*)htet->Clone("htet_errors");
TH1D * hte2 = (TH1D*)hte->Clone("hte_errors");
TH1D * hteta2 = (TH1D*)hteta->Clone("hteta_errors");
TH1D * htphi2 = (TH1D*)htphi->Clone("htphi_errors");

TLegend * legtPT = new TLegend(0.7,.8,0.9,0.9); 
TLegend * legtP = new TLegend(0.7,.8,0.9,0.9);
TLegend * legtET = new TLegend(0.7,.8,0.9,0.9);
TLegend * legtE = new TLegend(0.7,.8,0.9,0.9);
TLegend * legtETA = new TLegend(0.7,.8,0.9,0.9);
TLegend * legtPHI = new TLegend(0.7,.8,0.9,0.9);
legtPT->AddEntry(htpt,"t","f");
legtP->AddEntry(htp,"t","f");
legtET->AddEntry(htet,"t","f");
legtE->AddEntry(hte,"t","f");
legtETA->AddEntry(hteta,"t","f");
legtPHI->AddEntry(htphi,"t","f");

cant->Divide(3,2,.01,.01); 

cant->cd(1)->SetLogy();  

htpt->Draw("hist");
htpt2->Draw("e2 same");
legtPT->Draw();


cant->cd(4)->SetLogy();

htp->Draw("hist");
htp2->Draw("e2 same");
legtP->Draw();


cant->cd(2)->SetLogy();

htet->Draw("hist");
htet2->Draw("e2 same");
legtET->Draw();


cant->cd(5)->SetLogy();

hte->Draw("hist");
hte2->Draw("e2 same");
legtE->Draw();


cant->cd(3)->SetLogy();

hteta->Draw("hist");
hteta2->Draw("e2 same");
legtETA->Draw();


cant->cd(6)->SetLogy();

htphi->Draw("hist");
htphi2->Draw("e2 same");
legtPHI->Draw();

cant->SaveAs("top.png");
cant->SaveAs("top.pdf");[/code]






As you can tell, the .png looks fairly nice, but the .pdf is terrible. I have tried every pixel dimension of the canvas I can think of, yet it always seems to do this as long as there are error bars present.

Can anyone see anything that might fix my problem?

Thanks in advnace!!
top.pdf (59.1 KB)