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

Method draw

lib/mpl_toolkits/axisartist/axis_artist.py:200–224  ·  view source on GitHub ↗
(self, renderer)

Source from the content-addressed store, hash-verified

198 }
199
200 def draw(self, renderer):
201 if not self.get_visible():
202 return
203
204 gc = renderer.new_gc()
205 edgecolor = mcolors.to_rgba(self.get_markeredgecolor())
206 gc.set_foreground(edgecolor, isRGBA=True)
207 gc.set_linewidth(self.get_markeredgewidth())
208 gc.set_alpha(self._alpha)
209
210 tickvert_path = self._tick_paths[self._tick_dir]
211 path_trans = self.get_transform()
212 marker_transform = (Affine2D()
213 .scale(renderer.points_to_pixels(self._ticksize)))
214
215 for loc, angle in self.locs_angles:
216 locs = path_trans.transform_non_affine(np.array([loc]))
217 if self.axes and not self.axes.viewLim.contains(*locs[0]):
218 continue
219 renderer.draw_markers(
220 gc, tickvert_path,
221 marker_transform + Affine2D().rotate_deg(angle),
222 Path(locs), path_trans.get_affine())
223
224 gc.restore()
225
226
227class LabelBase(mtext.Text):

Callers 10

drawMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
_draw_lineMethod · 0.45
_draw_ticksMethod · 0.45
_draw_offsetTextMethod · 0.45
_draw_labelMethod · 0.45
test_AxesFunction · 0.45

Calls 15

get_markeredgecolorMethod · 0.95
get_markeredgewidthMethod · 0.95
Affine2DClass · 0.90
PathClass · 0.90
rotate_degMethod · 0.80
get_visibleMethod · 0.45
new_gcMethod · 0.45
to_rgbaMethod · 0.45
set_foregroundMethod · 0.45
set_linewidthMethod · 0.45
set_alphaMethod · 0.45
get_transformMethod · 0.45

Tested by 2

test_AxesFunction · 0.36