def _ticker(self):
locator = self.locator<EOL>formatter = self.formatter<EOL>if locator is None:<EOL><INDENT>if self.boundaries is None:<EOL><INDENT>if isinstance(self.norm, colors.NoNorm):<EOL><INDENT>nv = len(self._values)<EOL>base = <NUM_LIT:1> + int(nv/<NUM_LIT:10>)<EOL>locator = ticker.IndexLocator(base=base, offset=<NUM_LIT:0>)<EOL><DEDENT>elif isinstance(self.norm, colors.BoundaryNorm):<EOL><INDENT>b = self.norm.boundaries<EOL>locator = ticker.FixedLocator(b, nbins=<NUM_LIT:10>)<EOL><DEDENT>elif isinstance(self.norm, colors.LogNorm):<EOL><INDENT>locator = ticker.LogLocator()<EOL><DEDENT>else:<EOL><INDENT>locator = ticker.MaxNLocator()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>b = self._boundaries[self._inside]<EOL>locator = ticker.FixedLocator(b, nbins=<NUM_LIT:10>)<EOL><DEDENT><DEDENT>if isinstance(self.norm, colors.NoNorm):<EOL><INDENT>intv = self._values[<NUM_LIT:0>], self._values[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>intv = self.vmin, self.vmax<EOL><DEDENT>locator.create_dummy_axis()<EOL>formatter.create_dummy_axis()<EOL>locator.set_view_interval(*intv)<EOL>locator.set_data_interval(*intv)<EOL>formatter.set_view_interval(*intv)<EOL>formatter.set_data_interval(*intv)<EOL>b = np.array(locator())<EOL>b, ticks = self._locate(b)<EOL>formatter.set_locs(b)<EOL>ticklabels = [formatter(t, i) for i, t in enumerate(b)]<EOL>offset_string = formatter.get_offset()<EOL>return ticks, ticklabels, offset_string<EOL>
Return two sequences: ticks (colorbar data locations)
and ticklabels (strings).