On Tue, Jun 29, 2010 at 7:16 AM, Bartosz Telenczuk <b.telenc...@biologie.hu-berlin.de> wrote: > Hi all, > > I am trying to change the labels of minor ticks, but leave the labels of the > major ticks unchanged. To do this, I use the following function: > > ax = plt.subplot(111) > ax.set_xticks([1,3,5]) > ax.set_xticks([2,4], minor=True) > ax.set_xticklabels(["a", "b"], minor=True) > > However, in result of the function both minor and major tick labels are > changes. I checked the source code of XAxis.set_ticklabels and it contains > following lines: > > axis.py: lines 1335-1342 > > if minor: > self.set_minor_formatter(mticker.FixedFormatter(ticklabels)) > ticks = self.get_minor_ticks() > else: > self.set_major_formatter( mticker.FixedFormatter(ticklabels) ) > ticks = self.get_major_ticks() > > self.set_major_formatter( mticker.FixedFormatter(ticklabels) ) > > Note that the last lines sets the major tick formatter regardless of the > "minor" argument. Is it intentional behaviour?
Thanks for the report (and the good detective work). Fixed in trunk. (As far as I can tell, this is due to an SVN merge error from the transforms branch.) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users