parameters: (dbname)
docstring: Create a PDF file with box plots for all attributes.
docstring_summary: Create a PDF file with box plots for all attributes.
docstring_tokens: Create a PDF file with box plots for all attributes .
function: def plotStatistics(dbname):
      """Create a PDF file with box plots for all attributes."""
      warn('\n\n\tThis functionality is considered deprecated and might be removed '
           'in a future version.\n\tConsider using Planner Arena, '
           'http://plannerarena.org.\n')
      print("Generating plots...")
      conn = sqlite3.connect(dbname)
      c = conn.cursor()
      c.execute('PRAGMA FOREIGN_KEYS = ON')
      c.execute('SELECT id, name FROM plannerConfigs')
      planners = [(t[0], t[1].replace('geometric_', '').replace('control_', '')) \
          for t in c.fetchall()]
      c.execute('PRAGMA table_info(runs)')
      colInfo = c.fetchall()[3:]
  
      # the str() call is needed for backwards compatibility with python2
      with PdfPages(str(Path(dbname).with_suffix('.pdf'))) as pp:
          for col in colInfo:
              if col[2] == 'BOOLEAN' or col[2] == 'ENUM' or \
                 col[2] == 'INTEGER' or col[2] == 'REAL':
                  plotAttribute(c, planners, col[1], col[2])
                  pp.savefig(plt.gcf())
  
          c.execute('PRAGMA table_info(progress)')
          colInfo = c.fetchall()[2:]
          for col in colInfo:
              plotProgressAttribute(c, planners, col[1])
              pp.savefig(plt.gcf())
          plt.clf()
  
          pagey = 0.9
          pagex = 0.06
          c.execute("""SELECT id, name, timelimit, memorylimit FROM experiments""")
          experiments = c.fetchall()
          for experiment in experiments:
              c.execute("""SELECT count(*) FROM runs WHERE runs.experimentid = %d
                  GROUP BY runs.plannerid""" % experiment[0])
              numRuns = [run[0] for run in c.fetchall()]
              print(numRuns)
              numRuns = str(numRuns[0]) if len(set(numRuns)) == 1 else ','.join([str(i) for i in numRuns])
  
              plt.figtext(pagex, pagey, 'Experiment "%s"' % experiment[1])
              plt.figtext(pagex, pagey-0.05, 'Number of averaged runs: %s' % numRuns)
              plt.figtext(pagex, pagey-0.10, "Time limit per run: %g seconds" % experiment[2])
              plt.figtext(pagex, pagey-0.15, "Memory limit per run: %g MB" % experiment[3])
  
          pp.savefig(plt.gcf())
function_tokens: def plotStatistics ( dbname ) : warn ( '\n\n\tThis functionality is considered deprecated and might be removed ' 'in a future version.\n\tConsider using Planner Arena, ' 'http://plannerarena.org.\n' ) print ( "Generating plots..." ) conn = sqlite3 . connect ( dbname ) c = conn . cursor ( ) c . execute ( 'PRAGMA FOREIGN_KEYS = ON' ) c . execute ( 'SELECT id, name FROM plannerConfigs' ) planners = [ ( t [ 0 ] , t [ 1 ] . replace ( 'geometric_' , '' ) . replace ( 'control_' , '' ) ) for t in c . fetchall ( ) ] c . execute ( 'PRAGMA table_info(runs)' ) colInfo = c . fetchall ( ) [ 3 : ] # the str() call is needed for backwards compatibility with python2 with PdfPages ( str ( Path ( dbname ) . with_suffix ( '.pdf' ) ) ) as pp : for col in colInfo : if col [ 2 ] == 'BOOLEAN' or col [ 2 ] == 'ENUM' or col [ 2 ] == 'INTEGER' or col [ 2 ] == 'REAL' : plotAttribute ( c , planners , col [ 1 ] , col [ 2 ] ) pp . savefig ( plt . gcf ( ) ) c . execute ( 'PRAGMA table_info(progress)' ) colInfo = c . fetchall ( ) [ 2 : ] for col in colInfo : plotProgressAttribute ( c , planners , col [ 1 ] ) pp . savefig ( plt . gcf ( ) ) plt . clf ( ) pagey = 0.9 pagex = 0.06 c . execute ( """SELECT id, name, timelimit, memorylimit FROM experiments""" ) experiments = c . fetchall ( ) for experiment in experiments : c . execute ( """SELECT count(*) FROM runs WHERE runs.experimentid = %d
                  GROUP BY runs.plannerid""" % experiment [ 0 ] ) numRuns = [ run [ 0 ] for run in c . fetchall ( ) ] print ( numRuns ) numRuns = str ( numRuns [ 0 ] ) if len ( set ( numRuns ) ) == 1 else ',' . join ( [ str ( i ) for i in numRuns ] ) plt . figtext ( pagex , pagey , 'Experiment "%s"' % experiment [ 1 ] ) plt . figtext ( pagex , pagey - 0.05 , 'Number of averaged runs: %s' % numRuns ) plt . figtext ( pagex , pagey - 0.10 , "Time limit per run: %g seconds" % experiment [ 2 ] ) plt . figtext ( pagex , pagey - 0.15 , "Memory limit per run: %g MB" % experiment [ 3 ] ) pp . savefig ( plt . gcf ( ) )