allow xarr to be overridden in plot_fit