code: def genPlotLatex(
      inputFile,
      outputFile,
      xAxisField,
      yAxisField,
      axisType,
      noLegend,
      printXaxis,
      printYaxis,
      title,
  ):
      header = {}
      experiments = {}
      methStyles = {}
      rows = open(inputFile).readlines()
      for lineNumber, row in enumerate(rows):
          if lineNumber == 0:  # header information
              header = parseHeader(row)
              if xAxisField not in header:
                  raise Exception(
                      "You specified an invalid xAxis name '"
                      + xAxisField
                      + "', valid are: "
                      + ",".join(header)
                  )
              if yAxisField not in header:
                  raise Exception(
                      "You specified an invalid yAxis name '"
                      + yAxisField
                      + "', valid are: "
                      + ",".join(header)
                  )
          else:
              parsed = parseExpr(
                  inputFile,
                  lineNumber,
                  row,
                  header,
                  xAxisField,
                  yAxisField,
              )
              # group by method name
              methodName = parsed[0]
              methodData = parsed[2]
              methStyles[methodName] = parsed[1]
              if methodName in experiments:
                  experiments[methodName].append(methodData)
              else:
                  experiments[methodName] = [methodData]
  
      return genPGFPlot(
          experiments,
          methStyles,
          outputFile,
          xAxisField,
          yAxisField,
          axisType,
          noLegend,
          printXaxis,
          printYaxis,
          title,
      )
  
file_path: nmslib/previous_releases_scripts/genplot.py
imports: import argparse
  import os
  import re
  import sys
  import itertools
  import re
  from subprocess import call
label_desc: Use image node_id 7 for calling a global function with example usage: genPlotLatex(inputFile, outputFile, xAxisField, yAxisField, axisType, noLegend, printXaxis, printYaxis, title) and returns: genPGFPlot