added code to prevent xticks overflow in plots