Hi,
I have the following code to plot two histograms (overlayed)
canvas_z=TCanvas("canvas_z","canvas_z",1000,700)
hist=TH1D('hist',"error histo",100,-50,50)
fill_hist(hist,[...])
hist.GetXaxis().SetTitle("outputted $\chi^2$-desired $\chi^2$")
hist.SetLineWidth(2)
hist.Draw()
hist1=TH1D('hist1',"error histo",100,-50,50)
fill_hist(hist1,[...])
hist1.GetXaxis().SetTitle("outputted $\chi^2$-desired $\chi^2$")
hist1.SetLineColorAlpha(1, 1.0)
hist1.SetLineWidth(2)
hist1.Draw("same")
leg = TLegend(0.1,0.7,0.4,0.9) #x1,y1,x2,y2
leg.SetHeader("Interpolation methods")
leg.AddEntry(hist1,"one","l")
leg.AddEntry(hist,"two","l")
leg.Draw("same")
canvas_z.Update()
canvas_z.SaveAs('test.pdf')
When saving this as test.png one can see the axis labels, but when saving this as test.pdf one cannot see the axis labels?
Does someone know a solution?
Cheers,
Jan