FlexiText
Handle storing and drawing of formatted text.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
texts
|
tuple or list of flexitext.Text instances
|
These objects represent the text together with their styles. |
()
|
Source code in flexitext/flexitext.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
plot(x, y, ha='left', va='center', ma='left', mva='baseline', xycoords='axes fraction', ax=None)
¶
Draw text with multiple formats.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
float
|
The horizontal position to place the text. By default, this is in axes fraction coordinates. |
required |
y
|
float
|
The vertical position to place the text. By default, this is in axes fraction coordinates. |
required |
ha
|
str
|
Horizontal alignment. Must be one of |
'left'
|
va
|
str
|
Horizontal alignment. Must be one of |
'center'
|
ma
|
str
|
Alignment for multiline texts. The layout of the bounding box of all the lines is
determined by the |
'left'
|
mva
|
str
|
Vertical alignment for text within multiline texts. Can be one of |
'baseline'
|
xycoords
|
str
|
The coordinate system for |
'axes fraction'
|
ax
|
Axes
|
Matplotlib |
None
|
Returns:
Name | Type | Description |
---|---|---|
annotation_box |
AnnotationBbox
|
|
Source code in flexitext/flexitext.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|