MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _label_outer_xaxis

Method _label_outer_xaxis

lib/matplotlib/axes/_base.py:4979–5004  ·  view source on GitHub ↗
(self, *, skip_non_rectangular_axes,
                           remove_inner_ticks=False)

Source from the content-addressed store, hash-verified

4977 return ss
4978
4979 def _label_outer_xaxis(self, *, skip_non_rectangular_axes,
4980 remove_inner_ticks=False):
4981 # see documentation in label_outer.
4982 if skip_non_rectangular_axes and not isinstance(self.patch,
4983 mpl.patches.Rectangle):
4984 return
4985 ss = self._get_subplotspec_with_optional_colorbar()
4986 if ss is None:
4987 return
4988 label_position = self.xaxis.get_label_position()
4989 if not ss.is_first_row(): # Remove top label/ticklabels/offsettext.
4990 if label_position == "top":
4991 self.set_xlabel("")
4992 top_kw = {'top': False} if remove_inner_ticks else {}
4993 self.xaxis.set_tick_params(
4994 which="both", labeltop=False, **top_kw)
4995 if self.xaxis.offsetText.get_position()[1] == 1:
4996 self.xaxis.offsetText.set_visible(False)
4997 if not ss.is_last_row(): # Remove bottom label/ticklabels/offsettext.
4998 if label_position == "bottom":
4999 self.set_xlabel("")
5000 bottom_kw = {'bottom': False} if remove_inner_ticks else {}
5001 self.xaxis.set_tick_params(
5002 which="both", labelbottom=False, **bottom_kw)
5003 if self.xaxis.offsetText.get_position()[1] == 0:
5004 self.xaxis.offsetText.set_visible(False)
5005
5006 def _label_outer_yaxis(self, *, skip_non_rectangular_axes,
5007 remove_inner_ticks=False):

Callers 3

label_outerMethod · 0.95
subplotsMethod · 0.80
subplot_mosaicMethod · 0.80

Calls 8

set_xlabelMethod · 0.95
is_first_rowMethod · 0.80
set_tick_paramsMethod · 0.80
is_last_rowMethod · 0.80
get_label_positionMethod · 0.45
get_positionMethod · 0.45
set_visibleMethod · 0.45

Tested by

no test coverage detected