第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Matplotlib 動(dòng)畫不接受圓形補(bǔ)丁作為farg

Matplotlib 動(dòng)畫不接受圓形補(bǔ)丁作為farg

不負(fù)相思意 2021-09-25 17:01:35
import mathimport matplotlibimport matplotlib.pyplot as pltimport matplotlib.patches as patchesfrom matplotlib.patches import Circlefrom matplotlib import animationfrom utils import rgb2hexfrom tg import small_tgmatplotlib.rcParams["figure.figsize"]=(10, 5)matplotlib.rcParams['toolbar'] = 'None'fig, ax = plt.subplots()ax.axis("equal")ax.set_xlim(-10, 10)ax.set_ylim(-5, 5)ax.axis("off")state_nodes = []for state in small_tg["states"]:    center = small_tg["states"][state]["graphic_properties"]["position"]    state_nodes.append(Circle(center, 0.2, color = rgb2hex(255, 255, 255)))def animate(i, state):    print("&", i ,state)    y = math.ceil((abs(i-100))*2.55)    print(i, y, (abs(i-100))*2.55)    state.set_color = rgb2hex(y,y,y)    ax.add_artist(state)    return state,for state in state_nodes:    print(state)    animation.FuncAnimation(fig, animate, fargs = (state,), frames=201, interval=1, blit=True, repeat = False)plt.show()for 循環(huán)內(nèi)的打印語(yǔ)句顯示狀態(tài),但是 animate 函數(shù)內(nèi)的打印語(yǔ)句沒(méi)有顯示任何內(nèi)容,這意味著該函數(shù)沒(méi)有被調(diào)用。我找不到任何邏輯錯(cuò)誤。請(qǐng)幫忙。
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 221 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)