How to remove y axis from Pylab created image?

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 chart, only holding the x axis. And adding more fields to the chart, we see that a lot of dots are on the edge of the canvas and don't look good.

+7
python matplotlib python-imaging-library
source share
1 answer
 ax = pylab.gca() ax.yaxis.set_visible(False) pylab.show() 
+14
source share

All Articles