Skip to content

Commit 08a5f0e

Browse files
authored
Create Allow positioning of text inside TextBox
1 parent 6dcd951 commit 08a5f0e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Text can be positioned inside TextBox widget
2+
---------------------
3+
4+
A new parameter called ``textalignment`` can be used to control for the position of the text inside the Axes of the TextBox widget. By default it is set to ``"left"``.
5+
6+
For example a textbox with the property set to "center" can be created through
7+
8+
``
9+
10+
from matplotlib import pyplot as plt
11+
from matplotlib.widgets import TextBox
12+
13+
Box_input = plt.axes([0.2, 0.2, 0.1, 0.075])
14+
text_box = TextBox(ax = Box_input, textalignment = "center" )
15+
16+
``

0 commit comments

Comments
 (0)