I have successfully been using pyplot to show heatmaps. Today it seems to have stopped working.
My problem is that setting up my plot, then calling the show() method shows the figure in a window, but when I close this window (by clicking the x at the top), my code doesn't continue past where the show() method is called. It seems to hang on show().
matrix is a numpy matrix.
This is an example of my code:
plt.pcolor(matrix, cmap=plt.cm.binary)
plt.xlabel('xaxis', fontsize=20)
plt.ylabel('yaxis', fontsize=20)
plt.axis([0, matrix.shape[1], 0, matrix.shape[0]])
plt.colorbar()
#This is where my code hangs...
plt.show()
#Closing the window manually does nothing.
#And the close() method doesn't seem to do anything.
plt.close()
After the show() method is called, and the window is closed, my process keeps going, and I have to manually terminate it.
Does anyone know the reason why this is happening?