Simple curve smoothing in matplotlib --- equivalent to gnuplot "smooth bezier"?

I have a set of points that I want to build in matplotlib, say:

x = [1,4,6,7,8] y = [0.2, 0.4, 0.5, 0.6, 0.6] 

In gnuplot, I used the ability to directly use the smooth property for the plot property to get a smooth curve on the graph without first processing the data.

Is there an equivalent in matplotlib --- specify a set of points and tell me how to smooth it, bezier or spline, or something like that?

If not, what is the easiest way to accomplish this?

+6
python matplotlib
source share
1 answer

I think scipy interpolation and curve fitting functions will be closest to you. I don't know anything built into matplotlib.

+6
source share

All Articles