code: def power_tick(val, pos, times_sign=r'\times'):
      
      if val == 0:
          return r'$\mathregular{0}$'
      elif val < 0:
          exponent = int(np.log10(-val))
      else:
          exponent = int(np.log10(val))
      coeff = val / 10**exponent
  
      return r'$\mathregular{{{:.1f} {} 10^{:2d}}}$'.format(coeff,
                                                            times_sign,
                                                            exponent)
docs: Custom power ticker function.