zwq2018 commited on
Commit
84a3e25
1 Parent(s): 9bac4cf

Upload tool.py

Browse files
Files changed (1) hide show
  1. tool.py +2 -2
tool.py CHANGED
@@ -408,8 +408,8 @@ def plot_stock_data(stock_data: pd.DataFrame, ax: Optional[plt.Axes] = None, fig
408
  plt.xlabel(x_name, fontproperties=font_prop,fontsize=18)
409
  plt.ylabel(f'{index_name}', fontproperties=font_prop,fontsize=16)
410
  ax.set_title(title_name , fontproperties=font_prop,fontsize=16)
411
- plt.legend() # 显示图例
412
- fig = plt.gcf(prop=font_properties)
413
  fig.set_size_inches(18, 12)
414
 
415
  return ax
 
408
  plt.xlabel(x_name, fontproperties=font_prop,fontsize=18)
409
  plt.ylabel(f'{index_name}', fontproperties=font_prop,fontsize=16)
410
  ax.set_title(title_name , fontproperties=font_prop,fontsize=16)
411
+ plt.legend(prop=font_properties) # 显示图例
412
+ fig = plt.gcf()
413
  fig.set_size_inches(18, 12)
414
 
415
  return ax