I have code that makes a TGraph, saves the canvas as a pdf and writes the graph to a root file. On the pdf It shows as a curve, which is the option I used, but in the output root file it’s saved with a polyline! I can’t work out why. The code is as below:
TCanvas SherpaLundPythiaCutCanvas25;
TGraphErrors *SherpaLundPythiaCutGraph25 = new TGraphErrors(numberEntries,x25,y25, ey25, ex25);
SherpaLundPythiaCutGraph25->Draw("ACP");
auto PythiaCutLegend25 = new TLegend(0.6,0.7,0.8,0.9);
PythiaCutLegend25->SetHeader("Legend","C"); // option "C" allows to center the header
PythiaCutLegend25->AddEntry(SherpaLundPythiaCutGraph25,"SherpaLund 25% Fixed Efficiency (Pythia Cut)","l");
PythiaCutLegend25->Draw();
SherpaLundPythiaCutGraph25->Write("SherpaLundPythiaCutGraph25");
SherpaLundPythiaCutCanvas25.Print("SherpaLundPythiaCutGraph25.pdf");
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided