parameters: (
      prefix=None,
      xlabel=None,
      data=None,
      path=None,
      title=None,
      rows=None,
      key=None
  )
docstring: Plot a generic scatter plot.
docstring_summary: Plot a generic scatter plot.
docstring_tokens: Plot a generic scatter plot .
function: def plot_scatter(
      prefix=None,
      xlabel=None,
      data=None,
      path=None,
      title=None,
      rows=None,
      key=None
  ):
      '''Plot a generic scatter plot.'''
  
      keys = [i.split('_')[1:] for i in data.keys()]
      xticks = sorted({i[0] for i in keys}, key=key)
      libraries = sorted({i[1] for i in keys})
      row_data = [xticks]
      if rows is not None:
          row_data = [[i for i in xticks if i.startswith(r)] for r in rows]
          row_data = [i for i in row_data if i]
  
      def plot_ax(ax, xticks):
          '''Plot an axis with various subfigures.'''
  
          for library in libraries:
              ys = [data[f'{prefix}_{i}_{library}'] for i in xticks]
              points = ax.semilogy(
                  xticks, ys, '-o', mec='k', ms=15,
                  mew=1, alpha=.8, label=library
              )
  
          ax.grid(color='white', linestyle='solid')
          ax.set_title(title)
          ax.set_xlabel(xlabel)
          ax.set_ylabel('Time (Log)')
          ax.yaxis.set_major_formatter(ticker.FuncFormatter(lambda x, p: format_time(x)))
          ax.legend(libraries, fancybox=True, framealpha=1, shadow=True, borderpad=1)
  
      nrows = len(row_data)
      height = 8 * nrows
      fig = plt.figure(figsize=(10, height))
      index = 1
      for row in row_data:
          ax = fig.add_subplot(nrows, 1, index)
          plot_ax(ax, row)
          index += 1
  
      fig.savefig(path, format='svg')
      fig.clf()
function_tokens: def plot_scatter ( prefix = None , xlabel = None , data = None , path = None , title = None , rows = None , key = None ) : keys = [ i . split ( '_' ) [ 1 : ] for i in data . keys ( ) ] xticks = sorted ( { i [ 0 ] for i in keys } , key = key ) libraries = sorted ( { i [ 1 ] for i in keys } ) row_data = [ xticks ] if rows is not None : row_data = [ [ i for i in xticks if i . startswith ( r ) ] for r in rows ] row_data = [ i for i in row_data if i ] def plot_ax ( ax , xticks ) : '''Plot an axis with various subfigures.''' for library in libraries : ys = [ data [ f'{prefix}_{i}_{library}' ] for i in xticks ] points = ax . semilogy ( xticks , ys , '-o' , mec = 'k' , ms = 15 , mew = 1 , alpha = .8 , label = library ) ax . grid ( color = 'white' , linestyle = 'solid' ) ax . set_title ( title ) ax . set_xlabel ( xlabel ) ax . set_ylabel ( 'Time (Log)' ) ax . yaxis . set_major_formatter ( ticker . FuncFormatter ( lambda x , p : format_time ( x ) ) ) ax . legend ( libraries , fancybox = True , framealpha = 1 , shadow = True , borderpad = 1 ) nrows = len ( row_data ) height = 8 * nrows fig = plt . figure ( figsize = ( 10 , height ) ) index = 1 for row in row_data : ax = fig . add_subplot ( nrows , 1 , index ) plot_ax ( ax , row ) index += 1 fig . savefig ( path , format = 'svg' ) fig . clf ( )