resolves issue #10 - fixed plot xlim calculation