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

Method __init__

lib/matplotlib/axis.py:395–415  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

393 __name__ = 'xtick'
394
395 def __init__(self, *args, **kwargs):
396 super().__init__(*args, **kwargs)
397 # x in data coords, y in axes coords
398 ax = self.axes
399 self.tick1line.set(
400 data=([0], [0]), transform=ax.get_xaxis_transform("tick1"))
401 self.tick2line.set(
402 data=([0], [1]), transform=ax.get_xaxis_transform("tick2"))
403 self.gridline.set(
404 data=([0, 0], [0, 1]), transform=ax.get_xaxis_transform("grid"))
405 # the y loc is 3 points below the min of y axis
406 trans, va, ha = self._get_text1_transform()
407 self.label1.set(
408 x=0, y=0,
409 verticalalignment=va, horizontalalignment=ha, transform=trans,
410 )
411 trans, va, ha = self._get_text2_transform()
412 self.label2.set(
413 x=0, y=1,
414 verticalalignment=va, horizontalalignment=ha, transform=trans,
415 )
416
417 def _get_text1_transform(self):
418 return self.axes.get_xaxis_text1_transform(self._pad)

Callers

nothing calls this directly

Calls 5

_get_text1_transformMethod · 0.95
_get_text2_transformMethod · 0.95
__init__Method · 0.45
setMethod · 0.45
get_xaxis_transformMethod · 0.45

Tested by

no test coverage detected