In [ ]:
# Finishing Touches
fig,ax=plt.subplots()
# using the ax subplot object, we use the same
# syntax as above, but it allows us a little
# bit more advanced control
ax.pcolor(data,cmap=plt.cm.Reds,edgecolors='k')
ax.set_xticks(np.arange(0,6)+0.5)
ax.set_yticks(np.arange(0,10)+0.5)
# Here we put the x-axis tick labels
# on the top of the plot. The y-axis
# command is redundant, but inocuous.
ax.xaxis.tick_top()
ax.yaxis.tick_left()
# similar syntax as previous examples
ax.set_xticklabels(columns,minor=False,fontsize=20)
ax.set_yticklabels(rows,minor=False,fontsize=20)
# Here we use a text command instead of the title
# to avoid collision between the x-axis tick labels
# and the normal title position
plt.text(0.5,1.08,'Main Plot Title',
fontsize=25,
horizontalalignment='center',
transform=ax.transAxes
)
# standard axis elements
plt.ylabel('Y Axis Label',fontsize=20)
plt.xlabel('X Axis Label',fontsize=20)
plt.show()