开发者

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

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

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

In gnuplot, I used to be able to directly use the 'plot' command's smooth property to get a smooth curve on a graph, without having to preprocess the data.

Is 开发者_C百科there an equivalent in matplotlib---specify a set of points, and tell it how to smooth it, bezier or spline or something like that?

If not, what is the easiest way of accomplishing this?


I think scipy's interpolation and curve-fitting functions are the closest you are going to get. I don't know of anything built into matplotlib.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜