@@ -2601,13 +2601,30 @@ def get_xminorticklabels(self):
26012601 return cbook .silent_list ('Text xticklabel' ,
26022602 self .xaxis .get_minorticklabels ())
26032603
2604- def get_xticklabels (self , minor = False ):
2604+ def get_xticklabels (self , minor = False , which = None ):
26052605 """
26062606 Get the x tick labels as a list of :class:`~matplotlib.text.Text`
26072607 instances.
2608+
2609+ Parameter
2610+ ---------
2611+ minor : bool
2612+ If True return the minor ticklabels,
2613+ else return the major ticklabels
2614+
2615+ which : None, ('minor', 'major', 'both')
2616+ Overrides `minor`.
2617+
2618+ Selects which ticklabels to return
2619+
2620+ Returns
2621+ -------
2622+ ret : list
2623+ List of :class:`~matplotlib.text.Text` instances.
26082624 """
26092625 return cbook .silent_list ('Text xticklabel' ,
2610- self .xaxis .get_ticklabels (minor = minor ))
2626+ self .xaxis .get_ticklabels (minor = minor ,
2627+ which = which ))
26112628
26122629 @docstring .dedent_interpd
26132630 def set_xticklabels (self , labels , fontdict = None , minor = False , ** kwargs ):
@@ -2837,13 +2854,30 @@ def get_yminorticklabels(self):
28372854 return cbook .silent_list ('Text yticklabel' ,
28382855 self .yaxis .get_minorticklabels ())
28392856
2840- def get_yticklabels (self , minor = False ):
2857+ def get_yticklabels (self , minor = False , which = None ):
28412858 """
2842- Get the y tick labels as a list of :class:`~matplotlib.text.Text`
2843- instances
2859+ Get the x tick labels as a list of :class:`~matplotlib.text.Text`
2860+ instances.
2861+
2862+ Parameter
2863+ ---------
2864+ minor : bool
2865+ If True return the minor ticklabels,
2866+ else return the major ticklabels
2867+
2868+ which : None, ('minor', 'major', 'both')
2869+ Overrides `minor`.
2870+
2871+ Selects which ticklabels to return
2872+
2873+ Returns
2874+ -------
2875+ ret : list
2876+ List of :class:`~matplotlib.text.Text` instances.
28442877 """
28452878 return cbook .silent_list ('Text yticklabel' ,
2846- self .yaxis .get_ticklabels (minor = minor ))
2879+ self .yaxis .get_ticklabels (minor = minor ,
2880+ which = which ))
28472881
28482882 @docstring .dedent_interpd
28492883 def set_yticklabels (self , labels , fontdict = None , minor = False , ** kwargs ):
0 commit comments