Updated lines 86-91 with: # Adding annotation for the voltage at the end of the time interval v_end = v_values[-1] ax.annotate(f'{v_end:.4f} V', xy=(t_values[-1], v_end), xytext=(t_values[-1], v_end + 5), arrowprops=dict(facecolor='black', shrink=0.05)) st.pyplot(fig)