Using matplotlib, I define the following function to print labels. Labels are located at the right place, but label is not correct.
def printPointLabel(x,y,z,iternum,ax):
print x
label = '(%d, %d), ITER%s' % (x, y, iternum)
ax.text(x, y, z, label)
I call printPointLabel for four different points in the for loop
for i,num,c in zip((0,sampl4,2*sampl4,len(simplexpath)-1),(0,sampl4,2*sampl4,len(simplexpath)),('r','r','g','b')):
appendSimplex(xs,ys,zs,col,simplexpath[i], peaks, c)
printPointLabel(simplexpath[i][0][0],simplexpath[i][0][1],peaks([simplexpath[i] [0][0],simplexpath[i][0][1]]),num,ax)
and label content is not updated at each loop. It remains identical to first label.
Could you help?
Thanks!
There’s a problem with the
call. the
textfunction’s call signature is: