i have the random data in which i plotted graph for finding the peaks which is originated from zero i used this code
op_col = []
for i in df['Speed ']:
op_col.append(i)
print(op_col)
converting 'Speed' values to 1d array using for loop
[0, 7, 18, 24, 26, 27, 26, 25, 26, 16, 20, 16, 23, 33, 27, 27, 22, 26, 27, 26, 25, 24, 25, 26, 23, 25, 26, 24, 23, 12, 22, 11, 15, 24, 11, 12, 11, 27, 19, 25, 26, 21, 23, 26, 13, 9, 22, 18, 23, 26, 26, 25, 10, 22, 27, 25, 19, 10, 15, 20, 21, 13, 16, 16, 15, 19, 17, 20, 24, 26, 20, 23, 23, 25, 19, 15, 16, 27, 26, 27, 28, 24, 23, 24, 27, 28, 30, 31, 30, 9, 0, 11, 16, 25, 25, 22, 25, 25, 11, 15, 24, 24, 24, 17, 0, 23, 21, 0, 24, 26, 24, 26, 26, 26, 24, 25, 24, 24, 22, 22, 22, 23, 24, 26] this are my array values for plotting graph
import matplotlib.pyplot as plt
import numpy as np
from scipy.signal import find_peaks
from scipy import signal
peak, _ = find_peaks(x,height=0)
fig= plt.figure(figsize=(19,5))
plt.plot(x)
plt.plot(peak, x[peak], "x", color = 'r')
my code is detecting every peak value, but I want it to detect from 0 to max peak red marks values. how to do that?
the points has to be marked above 23 unable to do how can i do that



