reml plot function