made energy-level diagram graph's fig and axes as optional arguments