lets_plot.font_family_info#

lets_plot.font_family_info(family: str, width_correction: Real | None = None, mono: bool | None = None) FeatureSpec#

Specify properties of a particular font-family to adjust estimated width of text labels on plot.

Might be useful when some exotic font-family is used that causes issues with the plot layout.

Allow for manual correction in a rare cases when plot layout looks broken due to either overestimation or underestimation of size of text labels on plot.

Parameters:
familystr

Font family.

width_correctionnumber, optional

Correcting coefficient applied to default width estimate of a text label.

monobool, optional

When True - the font is marked as monospaced.

Returns:
FeatureSpec

Metainfo specification.

Notes

Can be mixed with other plot features in a plot-expression:

p + ggsize(300, 500) + font_family_info(“HyperFont”, mono=True)