comparison numerics/plot.py @ 177:c2c86c37eadd

this now works on Mac
author Jeff Hammel <k0scist@gmail.com>
date Thu, 10 Mar 2016 13:05:24 -0800
parents f62ac9a27a1f
children 30d820087ae8
comparison
equal deleted inserted replaced
176:f9c87cba1df3 177:c2c86c37eadd
73 """ 73 """
74 Read from file ``f`` 74 Read from file ``f``
75 Accepts CSV and space-delimited files 75 Accepts CSV and space-delimited files
76 """ 76 """
77 77
78 if isinstance(f, string):
79 with open(f, 'r') as _f:
80 return read(_f)
81
78 retval = None 82 retval = None
79 for line in f: 83 for line in f:
80 line = line.strip() 84 line = line.strip()
81 if ',' in line: 85 if ',' in line:
82 buffer = StringIO() 86 buffer = StringIO()
142 print ("Figure saved to file://{}".format(os.path.abspath(options.output.name))) 146 print ("Figure saved to file://{}".format(os.path.abspath(options.output.name)))
143 147
144 # display plot, I guess 148 # display plot, I guess
145 plt.show() 149 plt.show()
146 150
151
147 if __name__ == '__main__': 152 if __name__ == '__main__':
148 main() 153 main()