fix bug negative displacement not considered for plot