Skip to content

Instantly share code, notes, and snippets.

@jepio
Last active August 29, 2015 14:01
Show Gist options
  • Save jepio/c96b0057a3fd90dd75a8 to your computer and use it in GitHub Desktop.
Save jepio/c96b0057a3fd90dd75a8 to your computer and use it in GitHub Desktop.
Plot a file quickly using PyROOT.
#!/usr/bin/env python2
from ROOT import TGraph, gPad
filename = raw_input("Filename: ")
plot = TGraph(filename)
title = filename.split('.')[0]
plot.Draw()
plot.SetTitle(title)
gPad.Print(title + ".pdf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment