Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ed0538

Browse filesBrowse files
committed
ENH: update ticks when requesting labels
1 parent d73ba9e commit 5ed0538
Copy full SHA for 5ed0538

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,13 +1312,15 @@ def get_pickradius(self):
13121312

13131313
def get_majorticklabels(self):
13141314
"""Return this Axis' major tick labels, as a list of `~.text.Text`."""
1315+
self._update_ticks()
13151316
ticks = self.get_major_ticks()
13161317
labels1 = [tick.label1 for tick in ticks if tick.label1.get_visible()]
13171318
labels2 = [tick.label2 for tick in ticks if tick.label2.get_visible()]
13181319
return labels1 + labels2
13191320

13201321
def get_minorticklabels(self):
13211322
"""Return this Axis' minor tick labels, as a list of `~.text.Text`."""
1323+
self._update_ticks()
13221324
ticks = self.get_minor_ticks()
13231325
labels1 = [tick.label1 for tick in ticks if tick.label1.get_visible()]
13241326
labels2 = [tick.label2 for tick in ticks if tick.label2.get_visible()]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.