code: def _format_coord(self, x, limits):
          
          if x is None:
              return None
  
          formatter = self._mplformatter
          # Trick the formatter into thinking we have an axes
          # The 7 tick locations is arbitrary but gives a reasonable detail level
          formatter.locs = np.linspace(limits[0], limits[1], 7)
          formatter._set_format(*limits)
          formatter._set_orderOfMagnitude(abs(np.diff(limits)))
          return formatter.pprint_val(x)
docs: Handles display-range-specific formatting for the x and y coords.
  
          Parameters
          ----------
          x : number
              The number to be formatted
          limits : 2-item sequence
              The min and max of the current display limits for the axis.