handling of NaN values in sulated curve