Use the horizontalalignment
(which can be shortened as ha
) option to the annotate
call:
text_object = plt.annotate(label, xy=(x_values[i], y_values[i]), ha="center")
Use the horizontalalignment
(which can be shortened as ha
) option to the annotate
call:
text_object = plt.annotate(label, xy=(x_values[i], y_values[i]), ha="center")