Rotail
Rotail

Reputation: 1061

How can I add some text besides the curves in a plot?

  1. I have a vertical line that I would like to have a text label to it. How is it possible?

matplotlib.pyplot.vlines(q/pow(q+1, 2), 2, 13, colors=('black'), linestyles='solid')

  1. I would also like to do the same thing for a group of curves that I have made.

for c in my_range(C_initial, C_final, 3):
x = np.linspace(eta_initial, eta_final, 100)
y = c*pow(x, 0.6) plt.plot(x,y)

Upvotes: 0

Views: 69

Answers (1)

Molly
Molly

Reputation: 13610

You can use the function text. For your fist example that would be something like:

text(0.01,10,'label')

Here is more information on annotating a plot.

Upvotes: 1

Related Questions