# Spline interpolation that is non-decreasing when given non-decreasing sequence

How can I achieve a spline interpolation such that when given non-decreasing sequence of points the resulting spline will also be a non-decreasing function (and vice-versa, when given non-increasing sequence the interpolation would also be non-increasing)?

For example, here is a natural cubic spline interpolation: http://i.stack.imgur.com/W5yPA.png

over the following dataset:

270 71
333 102
355 109
406 111
427 168
As you can see, the polynom between points [355, 109] and [406, 111] is decreasing at some interval.

What kind of spline is best suited for such "monotone" interpolation?

EDIT: so here is the result of monotone cubic Hermite interpolation using Fritsch–Carlson method suggested by bubba:

• Search terms that might be useful are "splines under tension" and "monotone splines". – marty cohen Aug 13 '13 at 13:57

The resulting curve is only $C_1$ continuous, as opposed to the $C_2$ continuity that you would get from a conventional interpolating cubic spline. But, I expect that monotonicity is more important to you than $C_2$ continuity, so this is probably not a problem.