« first day (1059 days earlier)      last day (2319 days later) » 

4:57 PM
Is there any easy way to annotate the red line (which is drawn by
plt.axvline(threshold, color ='r', linestyle = 'dashed', linewidth = 2, label = 'Hello')?

I was to add a value to either the top or bottom of the line.

https://imgur.com/a/1PpQL


Here is my current code:



)

plt.subplot(1, 2, 1)
plt.imshow(otsu_img, cmap = 'gray')
plt.title('Otus Imag')
plt.savefig('otsu.png')



plt.subplot(1, 2, 2)
plt.bar(pixels, counts, align='center')
plt.axvline(threshold, color ='r', linestyle = 'dashed', linewidth = 2, label = 'Hello')
 
1 message moved from Python
 

« first day (1059 days earlier)      last day (2319 days later) »