From: Nat Echols [mailto:nathaniel.ech...@gmail.com] Sent: Thursday, March 31, 2011 16:47 I'd like to divide the line segments up to get a smoother color gradient, but the values are dictated by the experiment, not a mathematical function.
<snip> so I guess what I'm really asking for is a way to add intermediate X,Y values between every pair of values in 'points'. I can do this myself in Python, but I assume that's going to be pretty sluggish. Perhaps (for convenience if not speed) you could use a routine from scipy.interpolate [1,2], such as interp1d for piecewise linear interpolation. I imagine that, within each linear piece, you would want the density of x values to be roughly proportional to the slope. [1] http://docs.scipy.org/doc/scipy-0.8.x/reference/tutorial/interpolate.html [2] http://docs.scipy.org/doc/scipy-0.8.x/reference/interpolate.html
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users