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

Method get_grey

lib/matplotlib/texmanager.py:335–345  ·  view source on GitHub ↗

Return the alpha channel.

(cls, tex, fontsize=None, dpi=None)

Source from the content-addressed store, hash-verified

333
334 @classmethod
335 def get_grey(cls, tex, fontsize=None, dpi=None):
336 """Return the alpha channel."""
337 fontsize = mpl._val_or_rc(fontsize, 'font.size')
338 dpi = mpl._val_or_rc(dpi, 'savefig.dpi')
339 key = cls._get_tex_source(tex, fontsize), dpi
340 alpha = cls._grey_arrayd.get(key)
341 if alpha is None:
342 pngfile = cls.make_png(tex, fontsize, dpi)
343 rgba = mpl.image.imread(pngfile)
344 cls._grey_arrayd[key] = alpha = rgba[:, :, -1]
345 return alpha
346
347 @classmethod
348 def get_rgba(cls, tex, fontsize=None, dpi=None, rgb=(0, 0, 0)):

Callers 2

get_rgbaMethod · 0.80
draw_texMethod · 0.80

Calls 3

_get_tex_sourceMethod · 0.80
make_pngMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected