fix plottnig lines when the output image has a different aspect ratio than the window of the graph