In general, the intent of the Stineman interpolation is not so much to follow certain mathematical criteria, but more to provide a "visually pleasing" smooth interpolation. In other words: the interpolated curve typically is what the human eye would choose as smooth interpolation. It gives "good results" for many kinds of "typical" series of data and tends to have less overshooting effects than other interpolation methods. You will certainly find (or be able to construct) cases where this is not the case any more.
If you want a bit more control, you can provide the slopes via the optional yp argument. If you want to guarantee a monotonic interpolation, you will need to find an alternative algorithm for auto-computing the slopes from the points. If you want to have a look at the original paper, I can send you a scan. Greetings, Norbert Krishna Bhagavatula wrote: > Hi, > > Given that the values of ordinates are changing monotonically, I found > that in some cases, stineman interpolation is monotonic even when the > slopes are not monotonic. And in other cases, it overshoots. Like in > the following one: > > x = (0, 10, 70, 100) > y = (0, 535, 595, 1000) > xx = arange(0,100,1) > yy = stineman_interp(xx,x,y,yp=None) > plot(x,y,'x') > plot(xx,yy) > > Are there some factors that can make the interpolation monotonic, when > the slopes are not monotonic? or does it depend on case by case basis? > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users