Trying to get rid of on x axis overlapping issue. I couldn't change angle of the values

# Create a figure with sharing x-axis
fig, ax1 = plt.subplots(figsize=(10, 6))
# weekly order count on the left y-axis
ax1.bar(weekly_order_count.index.astype(str), weekly_order_count['id_order'], label='Weekly Order Count', color='skyblue')
ax1.set_ylabel('Order Count', color='skyblue')
ax1.tick_params('y', colors='skyblue')
# second y-axis for the discount rate on the right side
ax2 = ax1.twinx()
ax2.plot(weekly_discount_rate.index.astype(str), weekly_discount_rate['disc_pct'], label='Weekly Discount Rate', color='orange', marker='o', linestyle='--')
ax2.set_ylabel('Discount Rate (%)', color='orange')
ax2.tick_params('y', colors='orange')
# titles and labels
plt.title('Comparison of Weekly Order Count and Weekly Discount Rate')
plt.xlabel('Week')
plt.xticks(rotation=45)
lines, labels = ax1.get_legend_handles_labels()
lines2, labels2 = ax2.get_legend_handles_labels()
ax2.legend(lines + lines2, labels + labels2, loc='upper left')
plt.show()

fig.autofmt_xdate()?