0

I want to assign index number for peak both blue and green and want output like following picture. Index number of blue color is array(maxtab)[:,0] and green color is array(mintab)[:,0] that I mentioned on the picture with idx_1 for blue and idx_2 for green. For this picture values of

array(maxtab)[:,0] = [ 19.  35.  67. 100. 133. 167. 203. 235. 269. 303. 337. 370. 402. 434.
 467. 501. 535. 568.]

and

array(mintab)[:,0] = [ 29.  59.  93. 127. 160. 194. 222. 262. 292. 324. 362. 394. 424. 459.
 491. 528. 562. 594.]

Following the sample code and corresponding output. How can I do this?

    plt.style.use('ggplot') # nicer plots
    np.random.seed(52102) 
    plt.figure(figsize=(10,6))
    plot(series)
    scatter(array(maxtab)[:,0], array(maxtab)[:,1], color='blue')
    scatter(array(mintab)[:,0], array(mintab)[:,1], color='green')
    show()

enter image description here

Md. Rezwanul Haque
  • 2,882
  • 7
  • 28
  • 45
  • I don't understand your question: "I want to assign `index number` for peak both blue and green." Are you trying to annotate (write one the plot) the coordinates of the blue and green points? – Diziet Asahi Oct 31 '18 at 09:08
  • @DizietAsahi, Sir Please edited picture. I want outpt like this picture. Thanks. – Md. Rezwanul Haque Oct 31 '18 at 09:17

0 Answers0