I want a free graphing 2D software that can generate image files of the graph according to the coordinates I give.
I think that these programs are the closest solution to your need:
http://www.padowan.dk/graph/ - for Windows
http://www.macupdate.com/app/mac/20194/plot - for Mac, also much more advanced