Imaging spectroscopy with the atomic force microscope