C (Pgplot) code to plot the Planck function of a black body (Sun or any other star)
Used as a teaching tool in an astrophysics course. For a given temperature (e.g. 5780 K for the Sun) will plot the star's spectral energy distribution (brightness at different wavelengths) and yield the total (bolometric) luminosity).