Итак, я пытался представить некоторые данные. Ось X ограничена двумя годами. Мой вопрос довольно прост, может кто-нибудь объяснить, почему ось X ограничена диапазоном дат с 2015Q1 по 2017Q1, когда доступные данные находятся между 2015Q1 - 2020Q1. Что-то отсутствует или неверно в моем коде?
dd2
qtr median count
0 2015Q1 1290000.0 27
1 2015Q2 1330000.0 43
2 2015Q3 1570000.0 21
3 2015Q4 1371000.0 20
4 2016Q1 1386500.0 20
5 2016Q2 1767500.0 22
6 2016Q3 1427500.0 32
7 2016Q4 1501000.0 31
8 2017Q1 1700000.0 29
9 2017Q2 1630000.0 15
10 2017Q3 1687500.0 24
11 2017Q4 1450000.0 15
12 2018Q1 1505000.0 13
13 2018Q2 1494000.0 14
14 2018Q3 1415000.0 21
15 2018Q4 1150000.0 15
16 2019Q1 1228000.0 15
17 2019Q2 1352500.0 12
18 2019Q3 1237500.0 12
19 2019Q4 1455000.0 26
20 2020Q1 1468000.0 9
код
x = dd2['qtr']
y1 = dd2['count']
y2 = dd2['median']
fig, ax = plt.subplots(figsize=(40,10))
ax = plt.subplot(111)
ax2 = ax.twinx()
y1_plot = y1.plot(ax=ax2, color='green', legend=True, marker='*', label="median")
y2_plot = y2.plot(ax=ax, color='red', legend=True, linestyle='--', marker='x', label="count")
plt.title('Price trend analysis')
ax.set_xticklabels(x, rotation='vertical',color='k', size=20)
ax.set_xlabel('year')
ax.set_ylabel('sold price')
ax2.set_ylabel('number of sales')
y1_patch = mpatches.Patch(color='red', label='median sold price')
y2_patch = mpatches.Patch(color='green', label='count')
plt.legend(handles=[y2_patch,y1_patch],loc='upper right')
plt.savefig('chart.png', dpi=300,bbox_inches ='tight')
plt.show()
![enter image description here](https://i.stack.imgur.com/wcNcT.png)