colour.plotting.common.font_scaling#

colour.plotting.common.font_scaling(scaling: Literal['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'larger', 'smaller', 'xx-small-colour-science', 'x-small-colour-science', 'small-colour-science', 'medium-colour-science', 'large-colour-science', 'x-large-colour-science', 'xx-large-colour-science'], value: float) Generator[source]#

Define a context manager setting temporarily a Matplotlib font scaling.

Parameters:
  • scaling (Literal['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'larger', 'smaller', 'xx-small-colour-science', 'x-small-colour-science', 'small-colour-science', 'medium-colour-science', 'large-colour-science', 'x-large-colour-science', 'xx-large-colour-science']) – Font scaling to temporarily set.

  • value (float) – Value to temporarily set the font scaling with.

Yields:

Generator.

Return type:

Generator

Examples

>>> with font_scaling("medium-colour-science", 2):
...     print(matplotlib.font_manager.font_scalings["medium-colour-science"])
2
>>> print(matplotlib.font_manager.font_scalings["medium-colour-science"])
1