class_docstr: Base class for formatting ticks on geographical axes using a
  rectangular projection (e.g. Plate Carree, Mercator).
class_docstr_tok: ["Base","class","for","formatting","ticks","on","geographical","axes","using","a","rectangular","projection","(","e.g",".","Plate","Carree",",","Mercator",")","."]
code: def set_locs(self, locs):
      Formatter.set_locs(self, locs)
      if not self._auto_hide:
          return
      self.locs, degs, mins, secs = self._get_dms(self.locs)
      secs = np.round(secs, self._precision - 3).astype("i")
      secs0 = secs == 0
      mins0 = mins == 0
  
      def auto_hide(valid, values):
          """Should I switch on auto_hide?"""
          if not valid.any():
              return False
          if valid.sum() == 1:
              return True
          return np.diff(values.compress(valid)).max() == 1
  
      # Potentially hide minutes labels when pure minutes are all displayed
      self._auto_hide_minutes = auto_hide(secs0, mins)
  
      # Potentially hide degrees labels when pure degrees are all displayed
      self._auto_hide_degrees = auto_hide(secs0 & mins0, degs)
  
imports: import matplotlib
  from matplotlib.ticker import Formatter, MaxNLocator
  import numpy
  import cartopy.crs
  from cartopy.mpl.geoaxes import GeoAxes
label_desc: Use image node_id 6 for calling the _PlateCarreeFormatter obj's underlying member method code with example usage: obj.set_locs(locs) and returns: unknown, False, True