docs: def create_csv_fig_from_df(self, data_frames=[], filename=None, headers=[], index_label=None,
                                 fig_type=None, title=None, xlabel=None, ylabel=None, xfont=10,
                                 yfont=10, titlefont=15, fig_size=(8, 10), image_type="eps"):
          """
          Joins all the datafarames horizontally and creates a CSV and an image file from
          those dataframes.
  
          :param data_frames: a list of dataframes containing timeseries data from various metrics
          :param filename: the name of the csv and image file
          :param headers: a list of headers to be applied to columns of the dataframes
          :param index_label: name of the index column
          :param fig_type: figure type. Currently we support 'bar' graphs
                           default: normal graph
          :param title: display title of the figure
          :param filename: file name to save the figure as
          :param xlabel: label for x axis
          :param ylabel: label for y axis
          :param xfont: font size of x axis label
          :param yfont: font size of y axis label
          :param titlefont: font size of title of the figure
          :param fig_size: tuple describing size of the figure (in centimeters) (W x H)
          :param image_type: the image type to save the image as: jpg, png, etc
                             default: png
  
          :returns: creates a csv having name as "filename".csv and an image file
                    having the name as "filename"."image_type"
          """
  
          if not data_frames:
              logger.error("No dataframes provided to create CSV")
              sys.exit(1)
          assert(len(data_frames) == len(headers))
          dataframes = []
  
          for index, df in enumerate(data_frames):
              df = df.rename(columns={"value": headers[index].replace("_", "")})
              dataframes.append(df)
          res_df = pd.concat(dataframes, axis=1)
  
          if "unixtime" in res_df:
              del res_df['unixtime']
          if not index_label:
              index_label = "Date"
  
          # Create the CSV file:
          csv_name = filename + ".csv"
          res_df.to_csv(csv_name, index_label=index_label)
          logger.debug("file: {} was created.".format(csv_name))
  
          # Create the Image:
          image_name = filename + "." + image_type
          title = title.replace("_", "")
          figure(figsize=fig_size)
          plt.subplot(111)
  
          if fig_type == "bar":
              ax = res_df.plot.bar(figsize=fig_size)
              ticklabels = res_df.index
              ax.xaxis.set_major_formatter(matplotlib.ticker.FixedFormatter(ticklabels))
          else:
              plt.plot(res_df)
  
          if not ylabel:
              ylabel = "num " + " & ".join(headers)
          if not xlabel:
              xlabel = index_label
  
          plt.title(title, fontsize=titlefont)
          plt.ylabel(ylabel, fontsize=yfont)
          plt.xlabel(xlabel, fontsize=xfont)
          plt.grid(True)
          plt.savefig(image_name)
          logger.debug("Figure {} was generated.".format(image_name))