code: def _maketicks(self, ax, units='THz'):
          
          # set y-ticks
          ax.yaxis.set_major_locator(MaxNLocator(6))
          ax.yaxis.set_minor_locator(AutoMinorLocator(2))
          ax.xaxis.set_minor_locator(AutoMinorLocator(2))
  
          # set x-ticks; only plot the unique tick labels
          ticks = self.get_ticks()
          unique_d = []
          unique_l = []
          if ticks['distance']:
              temp_ticks = list(zip(ticks['distance'], ticks['label']))
              unique_d.append(temp_ticks[0][0])
              unique_l.append(temp_ticks[0][1])
              for i in range(1, len(temp_ticks)):
                  if unique_l[-1] != temp_ticks[i][1]:
                      unique_d.append(temp_ticks[i][0])
                      unique_l.append(temp_ticks[i][1])
  
          logging.info('\nLabel positions:')
          for dist, label in list(zip(unique_d, unique_l)):
              logging.info('\t{:.4f}: {}'.format(dist, label))
  
          ax.set_xticks(unique_d)
          ax.set_xticklabels(unique_l)
          ax.xaxis.grid(True, ls='-')
  
          trans_xdata_yaxes = blended_transform_factory(ax.transData,
                                                        ax.transAxes)
          ax.vlines(unique_d, 0, 1,
                    transform=trans_xdata_yaxes,
                    colors=rcParams['grid.color'],
                    linewidth=rcParams['grid.linewidth'])
  
          # Use a text hyphen instead of a minus sign because some nice fonts
          # like Whitney don't come with a real minus
          labels = {'thz': 'THz', 'cm-1': r'cm$^{\mathrm{-}\mathregular{1}}$',
                    'ev': 'eV', 'mev': 'meV'}
          ax.set_ylabel('Frequency ({0})'.format(labels[units.lower()]))
docs: Utility method to add tick marks to a band structure.