Could someone assist me on how to display a graph in python?

I have downloaded and installed the canopy enthought environment for my python code.

However, when I use the plot command from pylab, it does not display the graph even though no error is generated. I am quite new to python. Kindly tell me how to display the graph.

Below is the sample code:

import numpy

import pylab

pylab.interactive(True)

y=numpy.array([2,3,4,5,6,6])

print y

x=pylab.linspace(-1, 1, 20)

pylab.plot(x, x**2, 'o-')

More Chinedu Nwaigwe's questions See All
Similar questions and discussions