Revision: 8953 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8953&view=rev Author: efiring Date: 2011-02-06 17:49:43 +0000 (Sun, 06 Feb 2011)
Log Message: ----------- bug: xlim, ylim with no arguments should not affect autoscaling Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/pyplot.py Modified: branches/v1_0_maint/lib/matplotlib/pyplot.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/pyplot.py 2011-02-06 07:47:43 UTC (rev 8952) +++ branches/v1_0_maint/lib/matplotlib/pyplot.py 2011-02-06 17:49:43 UTC (rev 8953) @@ -1054,10 +1054,14 @@ xlim(xmax=3) # adjust the max leaving min unchanged xlim(xmin=1) # adjust the min leaving max unchanged + Setting limits turns autoscaling off for the x-axis. + The new axis limits are returned as a length 2 tuple. """ ax = gca() + if not args and not kwargs: + return ax.get_xlim() ret = ax.set_xlim(*args, **kwargs) draw_if_interactive() return ret @@ -1077,9 +1081,13 @@ ylim(ymax=3) # adjust the max leaving min unchanged ylim(ymin=1) # adjust the min leaving max unchanged + Setting limits turns autoscaling off for the y-axis. + The new axis limits are returned as a length 2 tuple. """ ax = gca() + if not args and not kwargs: + return ax.get_ylim() ret = ax.set_ylim(*args, **kwargs) draw_if_interactive() return ret This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins