Updated level_plot to correctly plot the last element of the xBase.