Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bf73c1 commit 0a4b52eCopy full SHA for 0a4b52e
lib/matplotlib/axis.py
@@ -1108,8 +1108,14 @@ def get_tightbbox(self, renderer):
1108
return None
1109
1110
def get_tick_padding(self):
1111
- return max(self.majorTicks[0].get_tick_padding(),
1112
- self.minorTicks[0].get_tick_padding())
+ values = []
+ if len(self.majorTicks):
1113
+ values.append(self.majorTicks[0].get_tick_padding())
1114
+ if len(self.minorTicks):
1115
+ values.append(self.minorTicks[0].get_tick_padding())
1116
+ if len(values):
1117
+ return max(values)
1118
+ return 0.0
1119
1120
@allow_rasterization
1121
def draw(self, renderer, *args, **kwargs):
0 commit comments