# Axis labels dissapear if saving figure in pdf format

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.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

Does anybody have an idea?

It might be because of the presence of special symbols, chi and so on. Try removing them and see if you get the titles back in the pdf?

This has been fixed:
root.cern.ch/gitweb/?p=root.git … d1bc1d3943