I have a data file that includes several years’ temperature records, I read-in the data file with Pandas and now it becomes a DataFrame below:
In [86]: tso
Out[86]:
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 28170 entries, 2005-05-20 13:28:42.239999+00:00 to 2012-12-05 13:26:49.919999+00:00
Data columns:
Day 28170 non-null values
Month 28170 non-null values
Year 28170 non-null values
Temp 28170 non-null values
dtypes: float64(1), int64(3)
then I plot them according to ‘Month’and ‘year’columns:
ax=tso.groupby(['Month','Year']).mean().unstack().plot(linewidth=3,legend=False)
patches,labels=ax.get_legend_handles_labels()
ax.legend(unique(tso['Year'].values),loc='best')
plt.show()

now I want the last year’s temperatures are plotted by thick line. What should I do?Is there any solution simple? Thank you!
You could do something like: