Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing matshow xticklabel position from top to bottom of the figure

I'm using matshow() in matplotlib and the figures generated has the xticklabels on top by default. Is there a way to put the xticklabels on the bottom instead?

Appreciate any help with this. /M

like image 974
Shejo284 Avatar asked Jun 10 '13 10:06

Shejo284


1 Answers

Try doing the following to adjust the x ticks positions:

ax.xaxis.set_ticks_position('bottom')

Similarly, for the y ticks:

ax.yaxis.set_ticks_position('left')
like image 132
Saullo G. P. Castro Avatar answered Nov 16 '22 01:11

Saullo G. P. Castro