I am attempting to run a lot of tests automatically and generate a graph for
each one. However, at the moment, the previous graph remains on the figure
and the next plot is drawn over it.
I have read extensively the documentation and I have tried a whole lot of
different commands but to no avail. In the previous post it said to use
pylab.clf() which is exactly what I've been trying to use.
So far I have used pylab.cla(), pylab.clf() and pylab.close() although I
believe that this only closes an open figure window. I have no idea why it
is not working now especially since it would appear that my question had
already been answered in both the documentation and the forums.
I am using Python 2.6.4 on Ubuntu Linux.
Here is the relevant code I am using:
pylab.plot(xAxis, TrainingPoints, 'b-')
pylab.plot(xAxis, TestPoints, 'r-')
pylab.ylabel('Sum Squared Error')
pylab.title('Plot of Iris Training Errors')
outfilename = str(int(LEARNING_RATE)) + ".png"
I really hope one of you can spot an error otherwise I am completely stuck.
View this message in context: http://old.nabble.com/Clearing-A-Figure-(I-Know-That-This-Has-Been-Posted-Before-But-I-Does-Not-Work-For-Me)-tp28665976p28665976.html
Sent from the matplotlib - users mailing list archive at Nabble.com.