I am trying to add data value to the end of the line of matplotlib. This is my code:
fig, ax = plt.subplots(1, 1)
anz_df.plot(legend=True, ax=ax, figsize= (16,8))
ax.set_title("Number of confirmed cases between Australian' States vs New Zealand")
ax.set_ylabel('Number of confirmed Cases')
ax.set_xlabel('Date')
for line, name in zip(ax.lines, anz_df.columns):
y = line.get_ydata()[-1]
ax.annotate(name, xy=(1,y), xytext=(6,0), color=line.get_color(),
xycoords = ax.get_yaxis_transform(), textcoords="offset points",
size=14, va="center")
However, I want to add data value to the end of each line.
Also, which library that I can visualise data that support mouse hover like this:
Any thoughts are appreciated.