Matlab is a wonderful tool -- one that I use every day in my work as a graduate student. Since I have been playing with spectra lately, I thought it would be useful to have some reference spectra. The spectral line data is easily available from the NIST. Also, other authors have created online (java & javascript) programs that generate images of line spectra from this data, such as this one by Joachim Köppen (based on original work by John Talbot).
I decided to write a similar program in Matlab rather than Javascript, so it must be run locally on a machine equipped with Matlab. This program takes data consisting of line wavelengths and intensities and produces an image of the resulting spectrum. It treats each line as a Gaussian distribution in wavelength and at each wavelength it sums up the contributions from all lines. The resulting spectrum is then rendered in color to produce a realistic-looking display. The spectrum of calcium is visible below.
If anyone wishes to examine and/or run the code at home, it is available here.