Dear expert,
it seems that TCanvas::SaveAs is not properly excaping “quotes” when saving in .C format.
TCanvas c1
TH1F h("name", "\"title\"", 10, 0, 1)
h.Fill(0.2)
h.Draw()
c1.SaveAs("c1.C")
when executing the code, I get
Error: String literal syntax error c1.C:12:
in fact the quotes are not exaped:
TH1F *name = new TH1F("name",""title"",10,0,1);
.
I agree this situation is very uncommon: unless you use RooFit. In fact by the default it sets the title of plots as Rootplot of “variable”.