Correlation of vibrational excitations and electronic structure with submolecular resolution