0

How do I annotate both x,y points of my plotted graph using pyplot of matplotlib? I am working with python 2.7.12.

pyplot image graph

As of now I have got the labels for y axis points using the following code:

for i,j in zip(c1,c2):
    fig1.annotate('%s' %j, xy=(i,j), xytext=(1,0), textcoords='offset points')
neo_phyte
  • 9
  • 4
  • What is your problem ? A simple way to use `annotate`'s paramater is `(, )`. You seem to do this, even though you're naming `x, y` as `i, j` which is a bad idea in my opinion. – IMCoins Feb 28 '18 at 09:13
  • Code: temp='('+str(x)+','+str(y)+')' #prints temp ie a string onto i,j co ordinates fig1.text(x,y,temp) – neo_phyte Mar 02 '18 at 07:14

0 Answers0