Auto adjust the size of plots