File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Original file line number Diff line number Diff line change @@ -677,11 +677,20 @@ def __get__(self, instance, cls):
677
677
if instance is None :
678
678
return self
679
679
else :
680
+ # instance._get_tick() can itself try to access the majorTicks
681
+ # attribute (e.g. in certain projection classes which override
682
+ # e.g. get_xaxis_text1_transform). In order to avoid infinite
683
+ # recursion, first set the majorTicks on the instance to an empty
684
+ # list, then create the tick and append it.
680
685
if self ._major :
681
- instance .majorTicks = [instance ._get_tick (major = True )]
686
+ instance .majorTicks = []
687
+ tick = instance ._get_tick (major = True )
688
+ instance .majorTicks .append (tick )
682
689
return instance .majorTicks
683
690
else :
684
- instance .minorTicks = [instance ._get_tick (major = False )]
691
+ instance .minorTicks = []
692
+ tick = instance ._get_tick (major = False )
693
+ instance .minorTicks .append (tick )
685
694
return instance .minorTicks
686
695
687
696
You can’t perform that action at this time.
0 commit comments