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

Method __init__

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

Source from the content-addressed store, hash-verified

454 __name__ = 'ytick'
455
456 def __init__(self, *args, **kwargs):
457 super().__init__(*args, **kwargs)
458 # x in axes coords, y in data coords
459 ax = self.axes
460 self.tick1line.set(
461 data=([0], [0]), transform=ax.get_yaxis_transform("tick1"))
462 self.tick2line.set(
463 data=([1], [0]), transform=ax.get_yaxis_transform("tick2"))
464 self.gridline.set(
465 data=([0, 1], [0, 0]), transform=ax.get_yaxis_transform("grid"))
466 # the y loc is 3 points below the min of y axis
467 trans, va, ha = self._get_text1_transform()
468 self.label1.set(
469 x=0, y=0,
470 verticalalignment=va, horizontalalignment=ha, transform=trans,
471 )
472 trans, va, ha = self._get_text2_transform()
473 self.label2.set(
474 x=1, y=0,
475 verticalalignment=va, horizontalalignment=ha, transform=trans,
476 )
477
478 def _get_text1_transform(self):
479 return self.axes.get_yaxis_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_yaxis_transformMethod · 0.45

Tested by

no test coverage detected