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

Method __init__

lib/mpl_toolkits/axes_grid1/axes_rgb.py:93–123  ·  view source on GitHub ↗

Parameters ---------- pad : float, default: 0 Fraction of the Axes height to put as padding. axes_class : `~matplotlib.axes.Axes` Axes class to use. If not provided, ``_defaultAxesClass`` is used. *args Forwarded to *axes_c

(self, *args, pad=0, **kwargs)

Source from the content-addressed store, hash-verified

91 _defaultAxesClass = Axes
92
93 def __init__(self, *args, pad=0, **kwargs):
94 """
95 Parameters
96 ----------
97 pad : float, default: 0
98 Fraction of the Axes height to put as padding.
99 axes_class : `~matplotlib.axes.Axes`
100 Axes class to use. If not provided, ``_defaultAxesClass`` is used.
101 *args
102 Forwarded to *axes_class* init for the RGB Axes
103 **kwargs
104 Forwarded to *axes_class* init for the RGB, R, G, and B Axes
105 """
106 axes_class = kwargs.pop("axes_class", self._defaultAxesClass)
107 self.RGB = ax = axes_class(*args, **kwargs)
108 ax.get_figure().add_axes(ax)
109 self.R, self.G, self.B = make_rgb_axes(
110 ax, pad=pad, axes_class=axes_class, **kwargs)
111 # Set the line color and ticks for the axes.
112 for ax1 in [self.RGB, self.R, self.G, self.B]:
113 if isinstance(ax1.axis, MethodType):
114 ad = Axes.AxisDict(self)
115 ad.update(
116 bottom=SimpleAxisArtist(ax1.xaxis, 1, ax1.spines["bottom"]),
117 top=SimpleAxisArtist(ax1.xaxis, 2, ax1.spines["top"]),
118 left=SimpleAxisArtist(ax1.yaxis, 1, ax1.spines["left"]),
119 right=SimpleAxisArtist(ax1.yaxis, 2, ax1.spines["right"]))
120 else:
121 ad = ax1.axis
122 ad[:].line.set_color("w")
123 ad[:].major_ticks.set_markeredgecolor("w")
124
125 def imshow_rgb(self, r, g, b, **kwargs):
126 """

Callers

nothing calls this directly

Calls 8

make_rgb_axesFunction · 0.85
SimpleAxisArtistClass · 0.85
add_axesMethod · 0.80
set_markeredgecolorMethod · 0.80
popMethod · 0.45
get_figureMethod · 0.45
updateMethod · 0.45
set_colorMethod · 0.45

Tested by

no test coverage detected