code: def plot_result(
      result: pd.DataFrame(),
      column_as_x: str,
      savefig_filename: str = "fig/result.png",
      xlabel: str = "Date",
      ylabel: str = "Result",
      num_days_xticks: int = 20,
      xrotation: int = 0,
  ):
      columns = result.columns
      columns_strtegy = []
      for i in range(len(columns)):
          col = columns[i]
          if "Unnamed" not in col and col != column_as_x:
              columns_strtegy.append(col)
  
      result.reindex()
  
      x = result[column_as_x].values.tolist()
      plt.rcParams["figure.figsize"] = (15, 6)
      # plt.figure()
  
      fig, ax = plt.subplots()
      colors = [
          "black",
          "red",
          "green",
          "blue",
          "cyan",
          "magenta",
          "yellow",
          "aliceblue",
          "coral",
          "darksalmon",
          "firebrick",
          "honeydew",
      ]
      for i in range(len(columns_strtegy)):
          col = columns_strtegy[i]
          ax.plot(
              x,
              result[col],
              color=colors[i],
              linewidth=1,
              linestyle="-",
          )
  
      plt.title("", fontsize=20)
      plt.xlabel(xlabel, fontsize=20)
      plt.ylabel(ylabel, fontsize=20)
  
      plt.legend(labels=columns_strtegy, loc="best", fontsize=16)
  
      # set grid
      plt.grid()
  
      plt.xticks(size=22)  # 设置刻度大小
      plt.yticks(size=22)  # 设置刻度大小
  
      # #设置每隔多少距离⼀个刻度
      # plt.xticks(x[::60])
  
      # # 设置每月定位符
      # if if_set_x_monthlocator:
      #     ax.xaxis.set_major_locator(mdates.MonthLocator())  # interval = 1
  
      # 设置每隔多少距离⼀个刻度
      plt.xticks(x[::num_days_xticks])
  
      plt.setp(
          ax.get_xticklabels(),
          rotation=xrotation,
          horizontalalignment="center",
      )
  
      # 为防止x轴label重叠，自动调整label旋转角度
      if xrotation == 0:
          if_overlap = get_if_overlap(fig, ax)
  
          if if_overlap == True:
              plt.gcf().autofmt_xdate(ha="right")  # ⾃动旋转⽇期标记
  
      plt.tight_layout()  # 自动调整子图间距
  
      plt.savefig(savefig_filename)
  
      plt.show()
  
imports: from __future__ import annotations
  import copy
  import datetime
  from copy import deepcopy
  import matplotlib.dates
  import matplotlib.pyplot
  import numpy
  import pandas
  import pyfolio
  from pyfolio import timeseries
  from finrl import config
  from finrl.meta.data_processors.func import date2str
  from finrl.meta.data_processors.func import str2date
  from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
label_desc: Use image node_id 9 for calling a global function with example usage: plot_result(result, column_as_x, savefig_filename, xlabel, ylabel, num_days_xticks, xrotation) without return types