Revision: 7237
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7237&view=rev
Author: jswhit
Date: 2009-06-24 18:18:55 +0000 (Wed, 24 Jun 2009)
Log Message:
-----------
simplify _check_ax method
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 2009-06-24
18:11:30 UTC (rev 7236)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-06-24
18:18:55 UTC (rev 7237)
@@ -3393,25 +3393,22 @@
raise KeyError("barstyle must be 'simple' or 'fancy'")
return rets
- def _check_ax(self, ax=None):
+ def _check_ax(self):
"""
- Returns the axis on which to draw.
- By default, returns self.ax. If None, set it to plt.gca()
+ Returns the axis on which to draw.
+ Returns self.ax, or if self.ax=None returns plt.gca().
"""
- #
- if ax is None:
- if self.ax is None:
- try:
- ax = plt.gca()
- except:
- import matplotlib.pyplot as plt
- ax = plt.gca()
- else:
- ax = self.ax
+ if self.ax is None:
+ try:
+ ax = plt.gca()
+ except:
+ import matplotlib.pyplot as plt
+ ax = plt.gca()
# associate an axes instance with this Basemap instance
# the first time this method is called.
- # self.ax = ax
- #return self.ax
+ #self.ax = ax
+ else:
+ ax = self.ax
return ax
### End of Basemap class
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins