MCPcopy Create free account
hub / github.com/daft-dev/daft / add_text

Method add_text

daft.py:338–360  ·  view source on GitHub ↗

A subclass of plate to writing text using grid coordinates. Any ``**kwargs`` are passed through to :class:`PGM.Plate`. :param x: The x-coordinate of the text in *model units*. :param y: The y-coordinate of the text. :param label:

(self, x, y, label, fontsize=None)

Source from the content-addressed store, hash-verified

336 return None
337
338 def add_text(self, x, y, label, fontsize=None):
339 """
340 A subclass of plate to writing text using grid coordinates. Any
341 ``**kwargs`` are passed through to :class:`PGM.Plate`.
342
343 :param x:
344 The x-coordinate of the text in *model units*.
345
346 :param y:
347 The y-coordinate of the text.
348
349 :param label:
350 A string to write.
351
352 :param fontsize: (optional)
353 The fontsize to use.
354
355 """
356
357 text = Text(x=x, y=y, label=label, fontsize=fontsize)
358 self._plates.append(text)
359
360 return None
361
362 def render(self, dpi=None):
363 """

Callers 2

test_deconvolutionFunction · 0.95
test_add_textFunction · 0.80

Calls 1

TextClass · 0.85

Tested by 2

test_deconvolutionFunction · 0.76
test_add_textFunction · 0.64