-2

I am new to Python and need some help.

I need to read data from a file, say some (x, y) data, then plot them and draw some lines, as well as some text output, on a X-Y coordinate system. Then I need to save the image to a file (PNG, JPG or BMP, don't care about format).

Can somebody give some suggestion/directions? Thanks a lot.

-Nick

NickOSU
  • 65
  • 2
  • 8

2 Answers2

0

for read data from file, you need only read the guide of python

for the save this

Community
  • 1
  • 1
Odino
  • 141
  • 1
  • 6
  • 17
  • Thanks. I found this post is helpful http://stackoverflow.com/questions/26289679/python-create-image-with-multiple-colors-and-add-text – NickOSU Sep 04 '15 at 14:19
0

Thank you all for the help. I finally finish my work using these functions:

import matplotlib.pyplot as plt

import htmltag

import csv

plt.clf()

...

plt.savefig

...

reader = csv.DictReader(csvfile)

...

output = open("a.html","w")

output.write(text)

output.close()

NickOSU
  • 65
  • 2
  • 8