`
enter code here
` have this Data
""" Efficiency 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 0 0 59.02 60 56.54 56.54 62.63 61.94 61.94 62.9 59.02 0 """ import numpy as np import scipy as sp import scipy.interpolate import matplotlib.pyplot as plt
y = df["Efficiency"]
x = np.arange(y.size)
# Interpolate the data using a cubic spline to "new_length" samples
new_length = 50
new_x = np.linspace(x.min(), x.max())
new_y = sp.interpolate.interp1d(x, y, kind='cubic')
# Plot the results
plt.figure()
plt.subplot(2,1,1)
plt.plot(x, y, 'bo-')
plt.title('Using 1D Cubic Spline Interpolation')
plt.subplot(2,1,2)
plt.plot(new_x, new_y, 'ro-')
and i want the graph with more sampling points how can i do that
