The wave function of the $2\mathrm{p}_z$ orbital is
$$Ψ = \frac{1}{4\sqrt{2π}}\left(\frac Z a\right)^{5/2} r \mathrm e^{-Zr/a}\cos θ.$$
I'm confused if this function will be a three-dimensional function or a four-dimensional function?
My professor told me that
$$z/r = \cos θ,$$
where $θ$ is the angle made by $r$ with the $z$ axis. So, I guess it will be four-dimensional since we would have to then plug in
$$r = \sqrt{x^2 + y^2 + z^2}$$
in the equation.
But when he plotted the function, he plotted a three-dimensional one! What is the correct answer and why?

