plot_mag doesnt over write your input with garbage