'How to draw energy levels for hydrogen

I want to draw a diagram showing the different series (Lyman,Balmer,Paschen etc) for hydrogen including the spin orbit coupling, basically I want to recreate this

but fancy it up a bit and add my own text. I have no clue what program I would use to recreate this, I'm thinking maybe tikz or matplotlib but I have problems figuring out how I would go about that then.



Solution 1:[1]

The expression is evaluated as

a = (a + (param === 'add')) ? 1 : -1;

which boils down to

a = 1;

You may solve this by writing

a = a + ((param === 'add') ? 1 : -1);

or even shorter:

a += (param === 'add') ? 1 : -1;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1