Revision: 8262 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8262&view=rev Author: efiring Date: 2010-04-21 21:47:13 +0000 (Wed, 21 Apr 2010)
Log Message: ----------- Remove some pre-mpl-0.98 support Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-04-21 20:24:27 UTC (rev 8261) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-04-21 21:47:13 UTC (rev 8262) @@ -2660,10 +2660,7 @@ ax.hold(b) # reset current active image (only if pyplot is imported). if plt: - try: - plt.sci(ret) - except AttributeError: - plt.gci._current = ret + plt.sci(ret) # set axes limits to fit map region. self.set_axes_limits(ax=ax) return ret @@ -2725,10 +2722,7 @@ ax.hold(b) # reset current active image (only if pyplot is imported). if plt: - try: - plt.sci(ret) - except AttributeError: - plt.gci._current = ret + plt.sci(ret) # set axes limits to fit map region. self.set_axes_limits(ax=ax) return ret @@ -2764,10 +2758,7 @@ ax.hold(b) # reset current active image (only if pyplot is imported). if plt: - try: - plt.sci(ret) - except AttributeError: - plt.gci._current = ret + plt.sci(ret) # set axes limits to fit map region. self.set_axes_limits(ax=ax) return ret @@ -2795,10 +2786,7 @@ ax.hold(b) # reset current active image (only if pyplot is imported). if plt: - try: - plt.sci(ret) - except AttributeError: - plt.gci._current = ret + plt.sci(ret) # set axes limits to fit map region. self.set_axes_limits(ax=ax) return ret @@ -2848,22 +2836,11 @@ ax.hold(b) raise ax.hold(b) + # reset current active image (only if pyplot is imported). + if plt and CS.get_array() is not None: + plt.sci(CS) # set axes limits to fit map region. self.set_axes_limits(ax=ax) - # reset current active image (only if pyplot is imported). - if plt: - try: # new contour. - if CS._A is not None: - try: - plt.sci(CS) - except AttributeError: - plt.gci._current = CS - except: # old contour. - if CS[1].mappable is not None: - try: - plt.sci(CS[1].mappable) - except AttributeError: - plt.gci._current = CS[1].mappable return CS def contourf(self,x,y,data,*args,**kwargs): @@ -2922,22 +2899,11 @@ ax.hold(b) raise ax.hold(b) + # reset current active image (only if pyplot is imported). + if plt and CS.get_array() is not None: + plt.sci(CS) # set axes limits to fit map region. self.set_axes_limits(ax=ax) - # reset current active image (only if pyplot is imported). - if plt: - try: # new contour. - if CS._A is not None: - try: - plt.sci(CS) - except AttributeError: - plt.gci._current = CS - except: # old contour. - if CS[1].mappable is not None: - try: - plt.sci(CS[1].mappable) - except AttributeError: - plt.gci._current = CS[1].mappable return CS def quiver(self, x, y, u, v, *args, **kwargs): @@ -3006,7 +2972,7 @@ # Because there are two collections returned in general, # we can't set the current image... #if plt is not None and ret.get_array() is not None: - # plt.sci(ret) + # plt.sci(retnh) # set axes limits to fit map region. self.set_axes_limits(ax=ax) return retnh,retsh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins