国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

matplotlib – Problem mit der Python-Funktion
習(xí)慣沉默
習(xí)慣沉默 2017-06-12 09:24:15
0
2
802
def createPlot():
    fig = plt.figure(1, facecolor = 'white')
    fig.clf()
    createPlot.ax1 = plt.subplot(111, frameon = False)
    plotNode('nonLeafNode', (0.2, 0.1), (0.4, 0.8), nonLeafNodes)
    plotNode('LeafNode', (0.8, 0.1), (0.6, 0.8), leafNodes)
    plt.show()

createPlot()

Was bedeutet createPlot.ax1 im Code? So einen Einsatz habe ich noch nie gesehen, deshalb bitte ich um Rat!

習(xí)慣沉默
習(xí)慣沉默

Antworte allen(2)
phpcn_u1582

python中一切皆對象

相當(dāng)于給這個(gè)對象加了一個(gè)attr

洪濤

樓上說的沒問題,為什么沒有幫助呢?python中createPlot是函數(shù)同時(shí)也是一個(gè)對象,python中的對象實(shí)現(xiàn)類似字典類型,為對象動(dòng)態(tài)添加一個(gè)屬性是沒有問題的。

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage