matplotlibを使用して、ラベルを印刷する次の関数を定義します。ラベルは正しい場所にありますが、ラベルが正しくありません。Matplotlib - リスト内のアイテムから構築されたポイントラベル
def printPointLabel(x,y,z,iternum,ax):
print x
label = '(%d, %d), ITER%s' % (x, y, iternum)
ax.text(x, y, z, label)
は私がループ
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)
のための4つの異なるポイントのためprintPointLabelを呼び出し、ラベルのコンテンツは、各ループで更新されていません。最初のラベルと同じままです。
お手伝いできますか?
ありがとうございます!
実はその最後のものは 'LEN(simplexpath)'ですが、ポイントは略:そのジッパーは奇妙です。 –