code: def set_longitude_grid(self, degrees):
          
          number = (360.0 / degrees) + 1
          locs = np.linspace(-np.pi, np.pi, number, True)[1:]
          locs[-1] -= 0.01 # Workaround for "back" gridlines showing.
          self.xaxis.set_major_locator(FixedLocator(locs))
          self._logitude_degrees = degrees
          self.xaxis.set_major_formatter(self.ThetaFormatter(degrees))
docs: Set the number of degrees between each longitude grid.