I am generating a colormap that plots a matrix-arranged set of data. I am using the following code:
import matplotlib.pyplot as plt
%matplotlib inline
pair_kinetic=np.zeros((50,29),dtype=float)
for k in range(50):
for m in range(29):
pair_kinetic[k][m]=np.abs(np.sum([P[k][m][i][i+2] for i in range(37)]))/40.
plt.imshow(np.flipud(np.transpose(np.flipud(np.fliplr(pair_kinetic)))),interpolation='none',cmap=plt.cm.jet,origin='lower',extent=(-5.0,-0.1,0.0,2.8))
plt.colorbar()
plt.title('pair kinetic energy',size=15)
plt.xlabel('$U_{1}$',size=15)
plt.ylabel('$U_{2}$',size=15)
plt.legend()
plt.show()
As a result I get the following figure:
Is there a simple way to remove the grey box appearing in the top right corner?
Thank you for any help!