8000 Update _base.py · matplotlib/matplotlib@eb0f7c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb0f7c7

Browse files
authored
Update _base.py
Adds an additional note to clarify get_xticklabels
1 parent 68d5e2f commit eb0f7c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3397,6 +3397,11 @@ def get_xticklabels(self, minor=False, which=None):
33973397
-------
33983398
ret : list
33993399
List of `~matplotlib.text.Text` instances.
3400+
3401+
Notes
3402+
-----
3403+
Please note that the tick label list is not populated until ``plt.draw()`` has been called.
3404+
See also: https://stackoverflow.com/questions/32700935/get-xticklabels-contains-empty-text-instances
34003405
"""
34013406
return self.xaxis.get_ticklabels(minor=minor, which=which)
34023407

0 commit comments

Comments
 (0)
0