I am trying to plot Planck's law for the radiation emitted by a black body, with different values of the temperature. This law reads
\begin{equation*}
\rho(\omega, T)
=
\cfrac{\hbar \omega^3}{\pi^2 c^3}
\frac{1}{\exp\bigBracket{\frac{\hbar \omega}{k_BT}} - 1},
\end{equation*}
where $\rho(\omega, T)$ is the density energy per unit volume for a wave whose pulsation lies in the interval [$\omega$, $\omega+d\omega$.
In the following, you will find the code to draw the desired graph:
\def\hPLANCK{6.62e-34}
\def\PI{3.14}
\def\hPLANCKbar{\hPLANCK/(2*\PI)}
\def\kb{1.38e-23}
\def\c{3e8}
\begin{tikzpicture}[samples=100, scale=1.15]
\begin{axis}[
xmin=0,
xmax=8e15,
xlabel={$\omega$ [\si{\hertz}]},
ymin=0,
ymax=10,
ylabel={$\rho (\omega; T)$ [\si{\joule\per\cubic\meter}]},
no markers,
grid=both,
style={ultra thick}]
\foreach \T in {3000, 4000, 5000}
{
\addplot+ {(\hPLANCKbar*x^3)/(\PI^2*\c^3)*(exp(\hPLANCKbar*x/(\kb*\T))-1)};
\addlegendentryexpanded{T = \T [\si{\kelvin}]}
}
\end{axis}
\end{tikzpicture}
Thank you for your time and help, and have a nice day

pgfplotsis -5:5, so you need to setdomain=0:8e15. Further, doublecheck what you're actually plotting. (Your exponential is in the numerator, not the denominator where it should be. And shouldn't it be c^2?) – Torbjørn T. Oct 08 '18 at 19:27