خرید بک لینک

Vote count: 0

I am plotting graphs with given points as an array, the plot attains a minimum and rises again. After a certain period the graph repeats(not exactly but almost repeats, its natural to what I am plotting), what i want to do is that fold the curve such that all the repeated parts are plotted over the first minimum. The details and variables are

y = [....array...]                  #y axis data points
t = [57224.3244,57224.5165,.....,57296.8754]   #time data points(x axis)   
t0 = 57233.7693             # here is the first minimum in curve
time = t-t0                 # reduce each t by t0 & gives the x axis range from -10 to 85
period = 16                 # second minimum at x= 16 and then x = 32 and so on
                            # at t = t0 or say at x = 0 the curve has a minima
                            # the plot is a curve from about x = -8 to 8 with minima at x=0
                            # the period is 16 means that the characterstic of graph repeats

i am plotting using

plt.scatter(time,y)

after x = 8 to x = 16, plot repeats in same fashion and behave same as it was from x = -8 to x = 8 and same story for x= 16 to x = 24. What I want is all the other periodic points get plotted over the first set of points and the it has to be done by using t - t0 way as it gives first minimum at x = 0, converts x points into simpler points from -10 to 85 and important elsewhere too. The xlim should be similar to x = -8 to x = 8 with minimum at x = 0. But folding the curve over itself is worrying me. I tried

for each in time:
    if each > 8 and each =< 16:
        each = each - 16                    # to make the points in between -8 to 8
    elif each > 16 and each =<32:
        each = each - 24                   # again to make points between -8 to 8 
    elif each > 32 and each =<48:
        each = each - 40
    ...... # similarly 

but it gave me error something related to a.any() and a.all(). I tried to others things but nothing worked. Please help. Thank you

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 28 خرداد 1395 ساعت: 6:20

صفحه بندی