Text this: On the relation between magnetic field strength and gas density in the interstellar medium