Q:

Is there a way to interpolate series with recurring values using matplotlib? 

I am trying to interpolate a x/y series using matplotlib.  The problem I am facing is that spline and interp1d fail because I have recurring values in both the x and y arrays. 
I have tried using the spline and interp1d functions from scipy, but both fail because of the recurring values issue
x1 = [0.82 0.82 0.82 0.82 0.82 0.82 0.83 0.83 0.83 0.83 0.83 0.83 0.83]
y1 = [0.93 0.93 0.93 0.93 0.94 0.94 0.94 0.94 0.94 0.94 0.94 0.94 0.94]
f = interp1d(x1, y1, kind='cubic')   #this gives an error: Expect x to be a 1-D sorted array_like. 

#another thing I tried

xnew = np.linspace(x1.min(),x1.max(),300)
splined = spline(x1,y1,xnew)    #this gives an error: Matrix is singular

I am expecting the interpolated y value to gradually increase with the increase of x. So for example, the corresponding y value for x = 0.82 would be 0.931, 0.932, etc.  My goal in the end is to get a smooth curve. 

A:

How about using a polynomial? 
np.poly1d(np.polyfit(x1, y1, 2))(new_x) # 2 for second degree

