Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb0f7c7

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

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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)