How can i plot an energy level diagram similar to the attached figure for the data file given below?
orbitals = ['1s1/2', '1p3/2', '1p1/2', '1d5/2','1d3/2','2s1/2','1f7/2','1f5/2','2p3/2','2p1/2',
'1g9/2','1g7/2','2d5/2','2d3/2','3s1/2','1h11/2','1h9/2','2f7/2','1i13/2']
neutron_energies = [
[-1.227,-39.078,-38.630,-34.666,-33.512,-32.237,-29.683,-27.441,-25.945,-24.930,-24.211,-20.484,-19.296,-17.191,-17.014,-18.309,-12.704,-12.388,-12.017],
[-1.261,-39.036,-38.583,-34.610,-33.445,-32.184,-29.614,-27.357,-25.890,-24.872,-24.130,-20.385,-19.246,-17.139,-16.977,-18.219,-12.597,-12.348,-11.919],
[-1.295,-38.995,-38.536,-34.554,-33.379,-32.130,-29.544,-27.273,-25.835,-24.815,-24.050,-20.287,-19.196,-17.089,-16.941,-18.129,-12.491,-12.309,-11.821],
[-1.329,-38.953,-38.489,-34.497,-33.312,-32.077,-29.475,-27.188,-25.780,-24.757,-23.969,-20.189,-19.146,-17.038,-16.905,-18.039,-12.385,-12.271,-11.724],
[-1.362,-38.911,-38.441,-34.440,-33.244,-32.023,-29.405,-27.103,-25.725,-24.699,-23.889,-20.091,-19.096,-16.988,-16.869,-17.950,-12.279,-12.233,-11.628]
]
proton_energies = [
[-33.169,-30.160,-29.613,-26.194,-24.910,-22.572,-21.473,-19.116,-16.421,-15.438,-16.118,-12.335,-9.839,-7.816,-7.117,-10.214,-4.651,-2.901,-3.818],
[-33.169,-30.160,-29.613,-26.194,-24.910,-22.572,-21.473,-19.116,-16.421,-15.438,-16.118,-12.335,-9.839,-7.816,-7.117,-10.214,-4.651,-2.901,-3.818],
[-33.169,-30.160,-29.613,-26.194,-24.910,-22.572,-21.473,-19.116,-16.421,-15.438,-16.118,-12.335,-9.839,-7.816,-7.117,-10.214,-4.651,-2.901,-3.818],
[-33.169,-30.160,-29.613,-26.194,-24.910,-22.572,-21.473,-19.116,-16.421,-15.438,-16.118,-12.335,-9.839,-7.816,-7.117,-10.214,-4.651,-2.901,-3.818],
[-33.169,-30.160,-29.613,-26.194,-24.910,-22.572,-21.473,-19.116,-16.421,-15.438,-16.118,-12.335,-9.839,-7.816,-7.117,-10.214,-4.651,-2.901,-3.818]
]
neutron_diffuseness = [0.52, 0.53, 0.54, 0.55, 0.56]
proton_diffuseness = [0.52, 0.53, 0.54, 0.55, 0.56]
Any help is appreciated.
I don’t know how to approach it wihtout completely restructuring the data file. Also, I don’t know how to avoid the overlap of the labels.