MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / get_depth

Method get_depth

site-packages/matplotlib/mathtext.py:3360–3377  ·  view source on GitHub ↗

Returns the offset of the baseline from the bottom of the image in pixels. *texstr* A valid mathtext string, e.g., r'IQ: $\\sigma_i=15$' *dpi* The dots-per-inch to render the text *fontsize* The font size in points

(self, texstr, dpi=120, fontsize=14)

Source from the content-addressed store, hash-verified

3358 return depth
3359
3360 def get_depth(self, texstr, dpi=120, fontsize=14):
3361 """
3362 Returns the offset of the baseline from the bottom of the
3363 image in pixels.
3364
3365 *texstr*
3366 A valid mathtext string, e.g., r'IQ: $\\sigma_i=15$'
3367
3368 *dpi*
3369 The dots-per-inch to render the text
3370
3371 *fontsize*
3372 The font size in points
3373 """
3374 assert self._output=="bitmap"
3375 prop = FontProperties(size=fontsize)
3376 ftimage, depth = self.parse(texstr, dpi=dpi, prop=prop)
3377 return depth
3378
3379def math_to_image(s, filename_or_obj, prop=None, dpi=None, format=None):
3380 """

Callers 1

latex2pngFunction · 0.80

Calls 2

parseMethod · 0.95
FontPropertiesClass · 0.90

Tested by

no test coverage detected