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

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

如何在已保存的另一個文件上顯示圖形?

如何在已保存的另一個文件上顯示圖形?

慕無忌1623718 2021-03-18 18:15:52
我正在使用pylab。那么它在使用from show_graph import display嗎?from pylab import *from numpy import outerfrom show_graph import displayrc('text', usetex=False)a=outer(arange(0,1,0.01),ones(10))figure(figsize=(10,5))subplots_adjust(top=0.8,bottom=0.05,left=0.01,right=0.99)maps=[m for m in cm.datad if not m.endswith("_r")]maps.sort()l=len(maps)+1for i, m in enumerate(maps):    subplot(1,l,i+1)    axis("off")    imshow(a,aspect='auto',cmap=get_cmap(m),origin="lower")    title(m,rotation=90,fontsize=10)savefig("colormaps.png",dpi=100,facecolor='gray')display("colormaps.png")但是當(dāng)我嘗試跑步時,它說 no module named show_graph
查看完整描述

1 回答

?
阿晨1998

TA貢獻(xiàn)2037條經(jīng)驗 獲得超6個贊

您應(yīng)刪除from show_graph import display,因為此導(dǎo)入會引發(fā)ImportError。然后,您保存和顯示情節(jié)的代碼可能像這樣


from pylab import *

from numpy import outer

rc('text', usetex=False)

a=outer(arange(0,1,0.01),ones(10))

figure(figsize=(10,5))

subplots_adjust(top=0.8,bottom=0.05,left=0.01,right=0.99)

maps=[m for m in cm.datad if not m.endswith("_r")]

maps.sort()

l=len(maps)+1

for i, m in enumerate(maps):

    subplot(1,l,i+1)

    axis("off")

    imshow(a,aspect='auto',cmap=get_cmap(m),origin="lower")

    title(m,rotation=90,fontsize=10)

savefig("colormaps.png",dpi=100,facecolor='gray')

show()


查看完整回答
反對 回復(fù) 2021-03-23
  • 1 回答
  • 0 關(guān)注
  • 153 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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