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

Method __init__

lib/mpl_toolkits/mplot3d/axis3d.py:61–142  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

59 return locals()
60
61 def __init__(self, *args, **kwargs):
62 params = _api.select_matching_signature(
63 [self._old_init, self._new_init], *args, **kwargs)
64 if "adir" in params:
65 _api.warn_deprecated(
66 "3.6", message=f"The signature of 3D Axis constructors has "
67 f"changed in %(since)s; the new signature is "
68 f"{inspect.signature(type(self).__init__)}", pending=True)
69 if params["adir"] != self.axis_name:
70 raise ValueError(f"Cannot instantiate {type(self).__name__} "
71 f"with adir={params['adir']!r}")
72 axes = params["axes"]
73 rotate_label = params["rotate_label"]
74 args = params.get("args", ())
75 kwargs = params["kwargs"]
76
77 name = self.axis_name
78
79 self._label_position = 'default'
80 self._tick_position = 'default'
81
82 # This is a temporary member variable.
83 # Do not depend on this existing in future releases!
84 self._axinfo = self._AXINFO[name].copy()
85 # Common parts
86 self._axinfo.update({
87 'label': {'va': 'center', 'ha': 'center',
88 'rotation_mode': 'anchor'},
89 'color': mpl.rcParams[f'axes3d.{name}axis.panecolor'],
90 'tick': {
91 'inward_factor': 0.2,
92 'outward_factor': 0.1,
93 },
94 })
95
96 if mpl.rcParams['_internal.classic_mode']:
97 self._axinfo.update({
98 'axisline': {'linewidth': 0.75, 'color': (0, 0, 0, 1)},
99 'grid': {
100 'color': (0.9, 0.9, 0.9, 1),
101 'linewidth': 1.0,
102 'linestyle': '-',
103 },
104 })
105 self._axinfo['tick'].update({
106 'linewidth': {
107 True: mpl.rcParams['lines.linewidth'], # major
108 False: mpl.rcParams['lines.linewidth'], # minor
109 }
110 })
111 else:
112 self._axinfo.update({
113 'axisline': {
114 'linewidth': mpl.rcParams['axes.linewidth'],
115 'color': mpl.rcParams['axes.edgecolor'],
116 },
117 'grid': {
118 'color': mpl.rcParams['grid.color'],

Callers

nothing calls this directly

Calls 7

set_data_intervalMethod · 0.95
set_view_intervalMethod · 0.95
set_rotate_labelMethod · 0.95
_init3dMethod · 0.95
getMethod · 0.45
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected