On Wed, 26 Sep 2007, Robert Kern apparently wrote:
> n = len(x)
> x2 = np.repeat(x, 2)
> y2 = np.hstack([0.0, np.repeat(np.arange(1,n) / float(n), 2), 1.0])
> pylab.plot(x2, y2)

OK, that's pretty slick.
I did not think about ``repeat``.
Thanks,
Alan




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to