Saving matplotlib figure as xmgrace file