views:

31

answers:

1
import pylab  # matplotlib

x_list = [1,1,1,1,5,4]
y_list = [1,2,3,4,5,4]

pylab.plot(x_list, y_list, 'bo')

pylab.show()

What I want to do is remove the y-axis from the diagram, only keeping the x-axis. And adding more margin to the diagram, we can see that a lot of dots are on the edge of the canvas and don't look good.

+3  A: 
ax = pylab.gca()
ax.yaxis.set_visible(False)
pylab.show()
Jim Brissom