Please provide the following information:
ROOT Version : 6.12/06
Platform, compiler : CentOS 7.5, gcc4.8.5, python 3.6.5
Hi, in a pyroot macro I’m saving a Canvas in pdf, png and jpg format.
Here an excerpt of the code:
from ROOT import TF1, TF2, TH1, TH2, TH2F, TAxis, TMath, TEllipse, TStyle, TFile, TColor, TSpectrum, TCanvas, TPad, TVirtualFitter, gStyle
import numpy as np
import sys
import time
[...]
pad1.cd()
histo.Draw("colz")
pad1.Update()
pad2.cd()
histo_zoom.Draw("colz")
pad2.Update()
can.SaveAs("test.pdf")
can.SaveAs("test.png")
can.SaveAs("test.jpg")
It works for pdf and jpg, but not for png. A file test.png is created, but it does not contain the image and does not seem to be a png file. What might be the reason?
If I save manually through the saveas option in the canvas menu it works just fine.
Thanks for looking into the riddle!