plot_scaled_text#

biotite.plot_scaled_text(axes, text, x, y, width=None, height=None, mode='unlocked', **kwargs)[source]#

Create a matplotlib.textpath.TextPath, whose text size is given in coordinates instead of font size.

Parameters:
axesAxes

The axes to draw the text on.

textstr

The text to be drawn.

x, yfloat

The lower left position of the text.

width, heightfloat, optional

The width/height text should have in its reference coordinate system. At least one value must be supplied.

mode{‘proportional’, ‘unlocked’, ‘maximum’, ‘minimum’}, optional

Defines how the text size is scaled. The scaling mode:

  • proportional - The width and height are scaled by the same extent. Either width or height must be set for this mode.

  • unlocked - The width and the height are scaled by different extents, changing the aspect ratio of the text. Both width and height must be set for this mode.

  • maximum - The width and the height are scaled by the same extent, so that they are at maximum as large as the supplied width/height. Both width and height must be set for this mode.

  • minimum - The width and the height are scaled by the same extent, so that they are at minimum as large as the supplied width/height. Both width and height must be set for this mode.

**kwargs

Additional parameters for the matplotlib.font_manager.FontProperties of the text or the created matplotlib.patches.PathPatch.

Returns:
patchmatplotlib.patches.PathPatch

The patch that represents the text.