How can i make an interpolated function back into discrete data points at different x points than the original data?

Viewed 42

I used the interpolate function on two data sets. Now I want to transform the resultant functions into discrete x-y datasets, with 500 points each for each dataset. It feels like something I should be able to do. but I haven't been able to figure out how. Here is my code. Ch_resting_spores is a species of diatom within my dataframe.

intersmall=interp1d(counting.age_med_Ka, counting.small)
elems={}
for i in diatoms.columns:    
    elems[i]=interp1d(diatoms.Age_ka,diatoms[i],kind='cubic')
fig,ax=plt.subplots()
ax.plot(diatoms["Age_ka"], elems['Ch_resting_spores'](diatoms["Age_ka"]),'r')
ax2=ax.twinx()
ax2.plot(counting['age_med_Ka'],intersmall(counting['age_med_Ka']))
ax.set_xlim(1030,1102)
0 Answers
Related