And this is what i would like to do:
Cheers.
CodePudding user response:
matplotlib.pyplot.annotate()
can be used to annotate (add a string) to a particular point. For example:
import matplotlib.pyplot as plt
plt.scatter([1, 2, 3], [4, 5, 6])
plt.annotate("X", (1, 4))
plt.annotate("Z", (3, 6))
plt.show()
CodePudding user response:
you can address a specific data point on a chart using the index value. Remember the list is ordered from 0-X (i.e the first in your list = 0 and so on
)
This function plots a blue square at point x,y where x is the data point first in the list =0 and y =0
fig.square(
x_vals_ideal_projection[0], y_vals_ideal_projection[0],
fill_alpha=0, size=8, color='blue',
legend_label="Projected Counts Burndown if wk 39 = 15 ")