I'm trying to graph a blackbody at different remperatures in the same graph, the temperatures are 10, 10^3, 10^5, 10^7, 10^9 and 10^12 kelvin. The 10^12 looks fine but the others look flat. I already tried to put it in log scale but it doesn't seem to help.
Here is my code:
import numpy as np
import matplotlib.pylab as plt
k = 1.38 * 10**-23
h = 6.62607015e-34
c = 3e8
def pla(T, nu):
x = (h*nu) / (k*T)
c1 = 2 * h * nu**3
planck = c1 / (np.exp(x) * c**2)
return planck
nus = np.linspace(0, 4e23)
T10 = pla(10, nus)
Te3 = pla(1e3, nus)
Te5 = pla(1e5, nus)
Te7 = pla(1e7, nus)
Te9 = pla(1e9, nus)
Te12 = pla(1e12, nus)
plt.xlabel("frecuencia")
plt.ylabel("temperatura")
plt.plot(nus, T10, color='blue', label='T10')
plt.plot(nus, Te3, color='red', label='Te3')
plt.plot(nus, Te5, color='orange', label='Te5')
plt.plot(nus, Te7, color='purple', label='Te7')
plt.plot(nus, Te9, color='gray', label='Te9')
plt.plot(nus, Te12, color='green', label='Te12')
plt.legend(loc='upper right')
plt.show()
result: