2

Multiple Lines

plt.plot(np.arange(1000), np.arange(1000), label = "y = x")
plt.plot(np.arange(1000), 2*np.arange(1000), label = "y = 2x")
plt.legend()
plt.show()

How can I modify it to write the labels on the line instead on the legend?

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
piby180
  • 388
  • 1
  • 6
  • 18
  • 2
    See: http://stackoverflow.com/questions/18780198/how-to-rotate-matplotlib-annotation-to-match-a-line?sa=X&ved=0CBYQ9QEwAGoVChMIu_Cku8SAxwIVSQUsCh2ulAB7 – j-i-l Jul 29 '15 at 14:20

0 Answers0