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,785
  • 6
  • 36
  • 56
piby180
  • 378
  • 1
  • 5
  • 16
  • 2
    See: http://stackoverflow.com/questions/18780198/how-to-rotate-matplotlib-annotation-to-match-a-line?sa=X&ved=0CBYQ9QEwAGoVChMIu_Cku8SAxwIVSQUsCh2ulAB7 – jojo Jul 29 '15 at 14:20

0 Answers0