Hello all,
When I print colored 2D histograms into a pdf file, the result is quite ugly:
Very thin white lines are drawn between the bins as well as in the color palette.
This makes to me very ugly the final output. Any idea about this issue and how to get rid of it?
Here I attached a simple macro to make a 2D histogram and print it to a pdf.
{
TCanvas *C = new TCanvas("C","",850,500);
C->cd();
gStyle->SetPadLeftMargin(0.08); // Margin left axis
gStyle->SetPadRightMargin(0.12); // Margin for palettes in 2D histos
gStyle->SetPalette(1);
gStyle->SetNumberContours(64);
TH2F *h2D = new TH2F("h2D","",100,-1.,1.,100,-1.,1.);
for(Int_t i=0;i<1e7;i++) {
Float_t x,y;
gRandom->Rannor(x,y);
h2D->Fill(x,y);
}
h2D->Draw("colz");
C->Print("h2D.pdf");
}
I need to finish several official plots for a publication and the only thing I need is to fix this issue.
Thanks a lot!
h2D.pdf (61.6 KB)