class_docstr: Realtime clock for live trading.
  
  This class is a drop-in replacement for
  :class:`zipline.gens.sim_engine.MinuteSimulationClock`.
  
  This mixes the clock with a live graph.
  
  Notes
  -----
  This seemingly awkward approach allows us to run the program using a single
  thread. This is important because Matplotlib does not play nice with
  multi-threaded environments. Zipline probably does not either.
  
  
  Matplotlib has a pause() method which is a wrapper around time.sleep()
  used in the SimpleClock. The key difference is that users
  can still interact with the chart during the pause cycles. This is
  what enables us to keep a single thread. This is also why we are not using
  the 'animate' callback of Matplotlib. We need to direct access to the
  __iter__ method in order to yield events to Zipline.
  
  The :param:`time_skew` parameter represents the time difference between
  the exchange and the live trading machine's clock. It's not used currently.
code: def __init__(
      self,
      sessions,
      context,
      callback=None,
      time_skew=pd.Timedelta("0s"),
      start=None,
      end=None,
  ):
      self.sessions = sessions
      self.time_skew = time_skew
      self._last_emit = None
      self._before_trading_start_bar_yielded = True
      self.context = context
      self.callback = callback
      self.start = start
      self.end = end
  
file_path: catalyst/catalyst/exchange/live_graph_clock.py
imports: from time import sleep
  import pandas
  from catalyst.constants import LOG_LEVEL
  from catalyst.exchange.utils.stats_utils import prepare_stats
  from catalyst.gens.sim_engine import BAR, SESSION_START, SESSION_END
  from logbook import Logger
label_desc: Use image node_id 1 to create a new LiveGraphClock object from inherited base classes: object with example: obj = LiveGraphClock(sessions, context, callback, time_skew, start, end)