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

Method __init__

lib/mpl_toolkits/axisartist/axis_artist.py:696–738  ·  view source on GitHub ↗

Parameters ---------- axes : `mpl_toolkits.axisartist.axislines.Axes` helper : `~mpl_toolkits.axisartist.axislines.AxisArtistHelper`

(self, axes,
                 helper,
                 offset=None,
                 axis_direction="bottom",
                 **kwargs)

Source from the content-addressed store, hash-verified

694 self.label.set_pad(v)
695
696 def __init__(self, axes,
697 helper,
698 offset=None,
699 axis_direction="bottom",
700 **kwargs):
701 """
702 Parameters
703 ----------
704 axes : `mpl_toolkits.axisartist.axislines.Axes`
705 helper : `~mpl_toolkits.axisartist.axislines.AxisArtistHelper`
706 """
707 # axes is also used to follow the axis attribute (tick color, etc).
708
709 super().__init__(**kwargs)
710
711 self.axes = axes
712
713 self._axis_artist_helper = helper
714
715 if offset is None:
716 offset = (0, 0)
717 self.offset_transform = ScaledTranslation(
718 *offset,
719 Affine2D().scale(1 / 72) # points to inches.
720 + self.axes.get_figure(root=False).dpi_scale_trans)
721
722 if axis_direction in ["left", "right"]:
723 self.axis = axes.yaxis
724 else:
725 self.axis = axes.xaxis
726
727 self._axisline_style = None
728 self._axis_direction = axis_direction
729
730 self._init_line()
731 self._init_ticks(**kwargs)
732 self._init_offsetText(axis_direction)
733 self._init_label()
734
735 # axis direction
736 self._ticklabel_add_angle = 0.
737 self._axislabel_add_angle = 0.
738 self.set_axis_direction(axis_direction)
739
740 # axis direction
741

Callers

nothing calls this directly

Calls 10

_init_lineMethod · 0.95
_init_ticksMethod · 0.95
_init_offsetTextMethod · 0.95
_init_labelMethod · 0.95
set_axis_directionMethod · 0.95
ScaledTranslationClass · 0.90
Affine2DClass · 0.90
__init__Method · 0.45
scaleMethod · 0.45
get_figureMethod · 0.45

Tested by

no test coverage detected