@@ -1094,7 +1094,7 @@ def add_artist(self, a):
10941094 self .artists .append (a )
10951095 self ._set_artist_props (a )
10961096 a ._remove_method = lambda h : self .artists .remove (h )
1097-
1097+
10981098 def add_collection (self , collection , autolim = False ):
10991099 'add a Collection instance to Axes'
11001100 label = collection .get_label ()
@@ -1106,7 +1106,7 @@ def add_collection(self, collection, autolim=False):
11061106 if autolim :
11071107 self .update_datalim (collection .get_verts (self .transData ))
11081108 collection ._remove_method = lambda h : self .collections .remove (h )
1109-
1109+
11101110 def add_line (self , line ):
11111111 'Add a line to the list of plot lines'
11121112 self ._set_artist_props (line )
@@ -1117,7 +1117,7 @@ def add_line(self, line):
11171117 line .set_label ('_line%d' % len (self .lines ))
11181118 self .lines .append (line )
11191119 line ._remove_method = lambda h : self .lines .remove (h )
1120-
1120+
11211121 def _update_line_limits (self , line ):
11221122 xdata = line .get_xdata (orig = False )
11231123 ydata = line .get_ydata (orig = False )
@@ -1143,7 +1143,7 @@ def add_patch(self, p):
11431143 self ._update_patch_limits (p )
11441144 self .patches .append (p )
11451145 p ._remove_method = lambda h : self .patches .remove (h )
1146-
1146+
11471147 def _update_patch_limits (self , p ):
11481148 'update the datalimits for patch p'
11491149 xys = self ._get_verts_in_data_coords (
@@ -1156,7 +1156,7 @@ def add_table(self, tab):
11561156 self ._set_artist_props (tab )
11571157 self .tables .append (tab )
11581158 tab ._remove_method = lambda h : self .tables .remove (h )
1159-
1159+
11601160 def relim (self ):
11611161 'recompute the datalimits based on current artists'
11621162 self .dataLim .ignore (True )
@@ -1165,7 +1165,7 @@ def relim(self):
11651165
11661166 for p in self .patches :
11671167 self ._update_patch_limits (p )
1168-
1168+
11691169 def update_datalim (self , xys ):
11701170 'Update the data lim bbox with seq of xy tups or equiv. 2-D array'
11711171 # if no data is set currently, the bbox will ignore its
@@ -2153,7 +2153,7 @@ def text(self, x, y, s, fontdict=None,
21532153 t .update (kwargs )
21542154 self .texts .append (t )
21552155 t ._remove_method = lambda h : self .texts .remove (h )
2156-
2156+
21572157
21582158 #if t.get_clip_on(): t.set_clip_box(self.bbox)
21592159 if kwargs .has_key ('clip_on' ): t .set_clip_box (self .bbox )
@@ -3139,17 +3139,19 @@ def make_iterable(x):
31393139 patches = []
31403140
31413141 # lets do some conversions now
3142- xconv = self .xaxis .converter
3143- if ( xconv ):
3144- units = self .xaxis .get_units ()
3145- left = xconv .convert ( left , units )
3146- width = xconv .convert ( width , units )
3142+ if self .xaxis is not None :
3143+ xconv = self .xaxis .converter
3144+ if ( xconv ):
3145+ units = self .xaxis .get_units ()
3146+ left = xconv .convert ( left , units )
3147+ width = xconv .convert ( width , units )
31473148
3148- yconv = self .yaxis .converter
3149- if ( yconv ):
3150- units = self .yaxis .get_units ()
3151- bottom = yconv .convert ( bottom , units )
3152- height = yconv .convert ( height , units )
3149+ if self .yaxis is not None :
3150+ yconv = self .yaxis .converter
3151+ if ( yconv ):
3152+ units = self .yaxis .get_units ()
3153+ bottom = yconv .convert ( bottom , units )
3154+ height = yconv .convert ( height , units )
31533155
31543156
31553157 if align == 'edge' :
@@ -4077,7 +4079,7 @@ def arrow(self, x, y, dx, dy, **kwargs):
40774079 Draws arrow on specified axis from (x,y) to (x+dx,y+dy).
40784080
40794081 Optional kwargs control the arrow properties:
4080- %(Arrow )s
4082+ %(FancyArrow )s
40814083 """
40824084 a = mpatches .FancyArrow (x , y , dx , dy , ** kwargs )
40834085 self .add_artist (a )
0 commit comments