On Wednesday, January 26, 2011, Soumyaroop Roy <soumyar...@gmail.com> wrote: > Hi Ben: > > That's encouraging! > > I want to be able plot up to N data points (the points are in an > ordered sequence) on a canvas and then zoom into the plot region > enclosed within a subset sequence (e.g., T1 to T2 data points, 0 <= T1 > < T2 <=N) by putting two cursors - one on T1 and the other one on T2. > > regards, > Soumyaroop >
One way to do that would be to set the x and/or y limits based on the min/max of the slice of data you want to view. For example: import numpy as np Import matplotlib.pyplot as plt X = np.linspace(0, 5*np.pi, 100) Y = np.sin(X) plt.plot(X, Y) iStart = 50 iEnd = 78 plt.xlim(X[iStart:iEnd].min(), X[iStart, iEnd].max()) plt.ylim(Y[iStart:iEnd].min(), Y[iStart, iEnd].max()) plt.show() ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users