Im trying to define a python function that creates a TGraph and displays the plot. Calling the function and exporting the TCanvas to *.eps works just fine. However, the window that usually displays the TCanvas closes instantly after opening.
[code]from ROOT import TGraph,TCanvas
from array import array
c1=TCanvas("c1","c1",600,600) g=TGraph(len(x),x,y) g.Draw("A*") c1.Print("a.eps")
If I dont use a function and instead execute my code directly, it works just fine.
Any ideas how to solve this would be greatly appreciated!