You cannot use interactive more (ion) in a console. Unfortunately the question is not very clear on what you want; but let's suppose you want to show a window with the plot that is animated. An easy way to get that would be to run the script outside an IPython console. In spyder you'd go to Run/Configure (or press F6) and select "Execute in a new dedicated Python console".
Now the problem with the script itself is that you first call plt.show(), which shows empty subplots. This has to be removed.
A version which would show an animation would be
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(2,3)
for t in range (1, tmax):
W = np.random.rand(6,100)
for ii in range(2):
for jj in range(3):
output = W[3*ii+jj,:].reshape((10,10),order = 'F')
if t == 1:
The important part for me was: "Now the problem with the script itself is that you first call plt.show(), which shows empty subplots. This has to be removed."