Return the width of the *nth* label, in pixels.
(self, nth)
| 243 | for loc in self.labelXYs) |
| 244 | |
| 245 | def _get_nth_label_width(self, nth): |
| 246 | """Return the width of the *nth* label, in pixels.""" |
| 247 | fig = self.axes.get_figure(root=False) |
| 248 | renderer = fig.get_figure(root=True)._get_renderer() |
| 249 | return (Text(0, 0, |
| 250 | self.get_text(self.labelLevelList[nth], self.labelFmt), |
| 251 | figure=fig, fontproperties=self._label_font_props) |
| 252 | .get_window_extent(renderer).width) |
| 253 | |
| 254 | def get_text(self, lev, fmt): |
| 255 | """Get the text of the label.""" |
no test coverage detected