Changed no plot to plotting NaN for invalid values.