I am trying to generate a .png file with the transparent background histogram or any plot with pyROOT, but it doesn’t work for me as following setting:
import ROOT c1 = ROOT.TCanvas("c1", "", 500, 500) c1.SetFillStyle(4000) c1.SetFrameFillStyle(4000) h1 = ROOT.TH1F("h1", "", 10, 0, 1) h1.Draw() c1.Print("test.png")
Even I tried following setting, I get a white background .png instead of transparent.
c1.SetFillColorAlpha(1, 0.) # Use black to check if it goes transparent.
- My environments :
Python : 3.6
ROOT : v6-14-02
Is it possible to have transparent background with pyROOT, or did I miss something?