Heavy ion separation with a gas-filled magnetic spectrograph