Skip to content

Commit e63974d

Browse files
authored
Update Allow positioning of text inside TextBox
1 parent a20e140 commit e63974d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/users/next_whats_new/Allow positioning of text inside TextBox

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ A new parameter called ``textalignment``,by default set to ``"left"``, can be us
55

66
For example a textbox with the property set to "center" can be created with
77

8-
``
8+
.. code-block::
99

10-
from matplotlib import pyplot as plt
11-
from matplotlib.widgets import TextBox
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, initial="text", label="", textalignment="center")
1215

13-
Box_input = plt.axes([0.2, 0.2, 0.1, 0.075])
14-
text_box = TextBox(ax=Box_input, initial="text", label="", textalignment="center")
1516

16-
``

0 commit comments

Comments
 (0)