code: def toggle_axis(self):
          
          # cycle through three axis states
          states = [False, 'world', 'all']
          # the state after toggling
          index = (states.index(self.view['axis']) + 1) % len(states)
          # update state to next index
          self.view['axis'] = states[index]
          # perform gl actions
          self.update_flags()
docs: Toggle a rendered XYZ/RGB axis marker:
          off, world frame, every frame