def display_graph(graphdef):
 mestate.console.write(('Expression: %s\n' % ' '.join(graphdef.expression.split())))
 mg = grapher.MavGraph()
 mg.set_marker(mestate.settings.marker)
 mg.set_condition(mestate.settings.condition)
 mg.set_xaxis(mestate.settings.xaxis)
 mg.set_linestyle(mestate.settings.linestyle)
 mg.set_show_flightmode(mestate.settings.show_flightmode)
 mg.set_legend(mestate.settings.legend)
 mg.add_mav(mestate.mlog)
 for f in graphdef.expression.split():
  mg.add_field(f)
 mg.process(mestate.flightmode_selections, mestate.mlog._flightmodes)
 lenmavlist = len(mg.mav_list)
 mg.mav_list = []
 child = multiprocessing.Process(target=graph_process, args=[mg, lenmavlist])
 child.start()
 mestate.mlog.rewind()

def display_graph ( graphdef ) : mestate . console . write ( ( 'Expression: %s\n' % ' ' . join ( graphdef . expression . split ( ) ) ) ) mg = grapher . MavGraph ( ) mg . set_marker ( mestate . settings . marker ) mg . set_condition ( mestate . settings . condition ) mg . set_xaxis ( mestate . settings . xaxis ) mg . set_linestyle ( mestate . settings . linestyle ) mg . set_show_flightmode ( mestate . settings . show_flightmode ) mg . set_legend ( mestate . settings . legend ) mg . add_mav ( mestate . mlog ) for f in graphdef . expression . split ( ) : mg . add_field ( f ) mg . process ( mestate . flightmode_selections , mestate . mlog . _flightmodes ) lenmavlist = len ( mg . mav_list ) mg . mav_list = [ ] child = multiprocessing . Process ( target = graph_process , args = [ mg , lenmavlist ] ) child . start ( ) mestate . mlog . rewind ( )
display a termgraph interactively from within ipython .