Smoothing a 2-D figure
问题 I have a number of vaguely rectangular 2D figures that need to be smoothed. A simplified example: fig, ax1 = plt.subplots(1,1, figsize=(3,3)) xs1 = [-0.25, -0.625, -0.125, -1.25, -1.125, -1.25, 0.875, 1.0, 1.0, 0.5, 1.0, 0.625, -0.25] ys1 = [1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 1.875, 1.75, 1.625, 1.5, 1.375, 1.25, 1.25] ax1.plot(xs1, ys1) ax1.set_ylim(0.5,2.5) ax1.set_xlim(-2,2) ; I have tried scipy.interpolate.RectBivariateSpline but that apparently wants data at all the points (e.g. for a