parameters: (prefix, outdir, suffix, ext, modes, names, labels, ylabel)
docstring: Show matplotlib plot of memory data
docstring_summary: Show matplotlib plot of memory data
docstring_tokens: Show matplotlib plot of memory data
function: def plotter(prefix, outdir, suffix, ext, modes, names, labels, ylabel):
      """Show matplotlib plot of memory data"""
  
      fig = plt.figure(figsize=[9,4], dpi=600)
      ax = fig.subplots()
  
      for name, label in zip(names, labels):
          for i, mode in enumerate(modes):
              fstr = 'gold/{}_{}.csv' if GOLD else '{}_{}.csv'
              data = pandas.read_csv(fstr.format(prefix, mode))
              ax.plot(data['n_samples'], data[name], label='{} ({})'.format(mode, label), markersize=8,
                      marker='osd'[i])
  
      ax.set_xlabel('Num. Samples', fontsize=12)
      ax.set_ylabel(ylabel, fontsize=12)
      ax.set_xscale('log', basex=2)
      ax.set_yscale('log', basey=2)
      ax.grid(True, color=[0.7]*3)
      ax.legend()
  
      outfile = os.path.join(outdir, '{}{}.{}'.format(prefix, '_' + suffix if suffix else '' , ext))
      fig.savefig(outfile)
function_tokens: def plotter ( prefix , outdir , suffix , ext , modes , names , labels , ylabel ) : fig = plt . figure ( figsize = [ 9 , 4 ] , dpi = 600 ) ax = fig . subplots ( ) for name , label in zip ( names , labels ) : for i , mode in enumerate ( modes ) : fstr = 'gold/{}_{}.csv' if GOLD else '{}_{}.csv' data = pandas . read_csv ( fstr . format ( prefix , mode ) ) ax . plot ( data [ 'n_samples' ] , data [ name ] , label = '{} ({})' . format ( mode , label ) , markersize = 8 , marker = 'osd' [ i ] ) ax . set_xlabel ( 'Num. Samples' , fontsize = 12 ) ax . set_ylabel ( ylabel , fontsize = 12 ) ax . set_xscale ( 'log' , basex = 2 ) ax . set_yscale ( 'log' , basey = 2 ) ax . grid ( True , color = [ 0.7 ] * 3 ) ax . legend ( ) outfile = os . path . join ( outdir , '{}{}.{}' . format ( prefix , '_' + suffix if suffix else '' , ext ) ) fig . savefig ( outfile )