import matplotlib.pyplot as plt

for c in range(-21,21):
    for i in range(0,20):
        print c,i
        plt.plot([c],[i],'r.')   


plt.show()
plt.clf()
print 10000

i am new to python
what i want to do is plot the graph and after plotting clear it and print 10000 .. but it is not clearing the plot .. plz help me modify the code accordingly .

well if ur newbie i would suggest that u use ipython rather than python .
well in ipython u can directly enter as

$ ipython -pylab // it has already all mathplot lib and numpy and scipy

then ur code gets something like this

for c in range(-21,21):
    for i in range(0,20):
        print c,i
        plot([c],[i],'r.')   


show()
clf()
print 10000
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.