import sys, glob from scipy import * plotfile = 'plot.png' if len(sys.argv) > 2: plotfile = sys.argv[2] if len(sys.argv) > 1: datafile = sys.argv[1] else: print "No data file name given. Please enter" datafile = raw_input("-> ") if len(sys.argv) <= 2: print "No output file specified using default (plot.png)" if len(glob.glob(datafile))==0: print "Data file %s not found. Exiting" % datafile sys.exit() data=io.array_import.read_array(datafile) gplt.plot(data[:,0],data[:,1],'title "Weight vs. time" with points') gplt.xtitle('Time [h]') gplt.ytitle('Hydrogen release [wt. %]') gplt.grid("off") gplt.output(plotfile,'png medium transparent picsize 600 400')