code: def plot(self, event_names, x_axis='step'):
      
  
      if isinstance(event_names, six.string_types):
        event_names = [event_names]
  
      events_list = self.get_events(event_names)
      for event_name, dir_event_dict in zip(event_names, events_list):
        for dir, df in six.iteritems(dir_event_dict):
          label = event_name + ':' + dir
          x_column = df['step'] if x_axis == 'step' else df['time']
          plt.plot(x_column, df['value'], label=label)
      plt.legend(loc='best')
      plt.show()
docs: Plots a list of events. Each event (a dir+event_name) is represetented as a line
         in the graph.
      Args:
        event_names: A list of events to plot. Each event_name may correspond to multiple events,
            each in a different directory.
        x_axis: whether to use step or time as x axis.