Draw a text instance. Parameters ---------- gc : `.GraphicsContextBase` The graphics context. x : float The x location of the text in display coords. y : float The y location of the text baseline in display coords.
(self, gc, x, y, s, prop, angle, ismath=False, mtext=None)
| 509 | self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX") |
| 510 | |
| 511 | def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): |
| 512 | """ |
| 513 | Draw a text instance. |
| 514 | |
| 515 | Parameters |
| 516 | ---------- |
| 517 | gc : `.GraphicsContextBase` |
| 518 | The graphics context. |
| 519 | x : float |
| 520 | The x location of the text in display coords. |
| 521 | y : float |
| 522 | The y location of the text baseline in display coords. |
| 523 | s : str |
| 524 | The text string. |
| 525 | prop : `~matplotlib.font_manager.FontProperties` |
| 526 | The font properties. |
| 527 | angle : float |
| 528 | The rotation angle in degrees anti-clockwise. |
| 529 | ismath : bool or "TeX" |
| 530 | If True, use mathtext parser. |
| 531 | mtext : `~matplotlib.text.Text` |
| 532 | The original text object to be rendered. |
| 533 | |
| 534 | Notes |
| 535 | ----- |
| 536 | **Notes for backend implementers:** |
| 537 | |
| 538 | `.RendererBase.draw_text` also supports passing "TeX" to the *ismath* |
| 539 | parameter to use TeX rendering, but this is not required for actual |
| 540 | rendering backends, and indeed many builtin backends do not support |
| 541 | this. Rather, TeX rendering is provided by `~.RendererBase.draw_tex`. |
| 542 | """ |
| 543 | self._draw_text_as_path(gc, x, y, s, prop, angle, ismath, mtext) |
| 544 | |
| 545 | def _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext): |
| 546 | """ |
no test coverage detected