0

Hello i've been stuck on this for a while now. My graph wont show i'm unsure if its because of my while loop:

while True:
   temperature = input("Temperature in Kelvin. Type stop to finish")

   if temperature == "stop":
    break

   else:
     tempy = float(temperature)

   print (tempy)

and my 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()

I'm not sure where i'm going wrong with this. Thank you

JH1
  • 1
  • 1

1 Answers1

0

Your loop surely has nothing to do with a problem. Checkout the link, there are multiple possible ways to solve your problem. You can also try saving your figure with plt.savefig('myfig.png'). If successful, then it's most probably the backend problem as suggested in the selected answer to the referenced question.