I have values in a 2D array which I ploy them using the following lines:
t1 = [[self.ax.text(i+.2,n-.6-j,myArray[0][j][i])
for i in range(myArray.shape[2])]
for j in range(myArray.shape[1])]
and I'm trying to update them using this:
t1.set_text(myArray[self.ref][0][0])
The error is:
AttributeError: 'list' object has no attribute 'set_text'
However, which I try to update one value only, like:
t1 = self.ax.text(10,10, myArray[0][0][0])
it works just fine.
My questions is: How can I update the plotting of the values of the whole array at once? And by update I mean removing the previous values and plotting the new once so they don't pile up.
Addition
I tried applied the solution mentioned here:
How to refresh text in Matplotlib?
and extend it to my problem, still didn't work.