Create spectrum file from graph