x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
pylab.plot(x, y)
frame = pylab.gca()
frame.axes.get_xaxis().set_ticks([])
frame.axes.get_yaxis().set_ticks([])
pylab.show()
How to remove values on x,y axis on plot in matplotlib