code: def toggle_legend(self, evt=None, show=None):
          "toggle legend display"
          if show is None:
              show = not self.conf.show_legend
              self.conf.show_legend = show
          self.conf.draw_legend(f toggle_legend(self, evt=None, show=None):
          "toggle legend display"
          if show is None:
              show = not self.conf.show_legend
              self.conf.show_legend = show
          self.conf.draw_legend()
docs: toggle legend display