fix bug of data plot outside the rect