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

Method set_fontsize

lib/matplotlib/table.py:551–574  ·  view source on GitHub ↗

Set the font size, in points, of the cell text. Parameters ---------- size : float Notes ----- As long as auto font size has not been disabled, the value will be clipped such that the text fits horizontally into the cell. Yo

(self, size)

Source from the content-addressed store, hash-verified

549 c.set_height(c.get_height() * yscale)
550
551 def set_fontsize(self, size):
552 """
553 Set the font size, in points, of the cell text.
554
555 Parameters
556 ----------
557 size : float
558
559 Notes
560 -----
561 As long as auto font size has not been disabled, the value will be
562 clipped such that the text fits horizontally into the cell.
563
564 You can disable this behavior using `.auto_set_font_size`.
565
566 >>> the_table.auto_set_font_size(False)
567 >>> the_table.set_fontsize(20)
568
569 However, there is no automatic scaling of the row height so that the
570 text may exceed the cell boundary.
571 """
572 for cell in self._cells.values():
573 cell.set_fontsize(size)
574 self.stale = True
575
576 def _offset(self, ox, oy):
577 """Move all the artists by ox, oy (axes coords)."""

Callers 1

tableFunction · 0.95

Calls 2

valuesMethod · 0.80
set_fontsizeMethod · 0.45

Tested by

no test coverage detected