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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

AttributeError:“FigureManagerBase”對象沒有屬性“window”

AttributeError:“FigureManagerBase”對象沒有屬性“window”

慕的地8271018 2022-07-26 20:55:29
我已經(jīng)很好地使用了下面的 python 代碼,但是當(dāng)我重新安裝 Anaconda python 2.7 版本時,該代碼有錯誤。為什么會這樣?plt.subplots_adjust(top=0.9, bottom=0.05, left=0.05, right=0.95, wspace=0.55, hspace=0.2)plt.figtext(0.5, 0.95, str(os.path.basename(self.filepath)),ha='center', color='black', weight='bold', size='small')mngr = plt.get_current_fig_manager()mngr.window.setGeometry(810, 30, 800, 800)show()Traceback (most recent call last):  File "C:\Users\hyeyoung\Desktop\20200211MHyeyoung.py", line 4482, in onOpenImageFile    self.ShowAFewFrames()  File "C:\Users\hyeyoung\Desktop\20200211MHyeyoung.py", line 4509, in ShowAFewFrames    mngr.window.setGeometry(810,30,800, 800)AttributeError: 'FigureManagerBase' object has no attribute 'window'--------------------------------------------------------------------------Anaconda python ver. : 2.7matplotlib ver. :2.2.2please give me an answer. thx
查看完整描述

1 回答

?
炎炎設(shè)計

TA貢獻1808條經(jīng)驗 獲得超4個贊

您假設(shè)plt.get_current_fig_manager()返回一個具有window屬性的對象。Qt4Agg只有在使用, 或Qt5Agg(或Qt4CairoQt5Cairo)后端時才會出現(xiàn)這種情況,因為在這種情況下,圖形管理器是 a FigureManagerQT,它是QtWidgets.QWidgetQt 小部件的子類,并且具有window屬性。

因此,如果您想使用該屬性,請確保使用相應(yīng)的后端,例如

matplotlib.use("Qt5Agg")


查看完整回答
反對 回復(fù) 2022-07-26
  • 1 回答
  • 0 關(guān)注
  • 276 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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