At first, I wrote
## show the map and all that ##
def showMap():
plt.figure()
plt.imshow(im)
# draw junctions as squares
plt.scatter(junctionX, junctionY, marker='s', color='green')
plt.show()
Then, the interactive console hangs until I close the figure. This question gives a solution for this, and I modified my code to
## show the map and all that ##
def showMap():
plt.figure()
plt.imshow(im)
# draw junctions as squares
plt.scatter(junctionX, junctionY, marker='s', color='green')
plt.ion()
plt.show()
Now, indeed I can return to the console and keep running other codes, but my figure there becomes Non Responding. How may I fix it?
I am using the Python Tools for Visual Studio, because my project is a mix of a C++ project and a Python one. I have tested exactly the same code in Spyder, and it works perfectly fine there. So I think it is from the differences between IDEs.