[英]Graphs on Python as plt.plot wont show
您好,我已經堅持了一段時間了。 我的圖表不會顯示我不確定是否是因為我的 while 循環:
while True:
temperature = input("Temperature in Kelvin. Type stop to finish")
if temperature == "stop":
break
else:
tempy = float(temperature)
print (tempy)
和我的 plot:
intensities=rad(lambda_range_metres,root_mean_square_dev)
# Plot the intensity values against the wavelength in millimetres
plt.plot(lambda_range,intensities)
plt.title('i')
plt.xlabel('i /i ')
plt.ylabel('i / i')
plt.show()
我不確定我在哪里出錯了。 謝謝
您的循環肯定與問題無關。 查看鏈接,有多種可能的方法可以解決您的問題。 您也可以嘗試使用plt.savefig('myfig.png')
保存您的圖形。 如果成功,那么很可能是所選答案中所建議的后端問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.