【发布时间】:2021-11-12 22:02:44
【问题描述】:
我正在使用绘图 pandas 数据框,并使用以下代码保存了结果图。输出文件在图像查看器中打开时看起来很奇怪,如下所示。我不明白为什么背景不是全白的。
我使用的是名为 Zorin 的 Linux 操作系统,它是 Ubuntu 的衍生产品。
fig, ax = plt.subplots(figsize=(15, 10))
account_profit_df.plot(
style="*-",
figsize=(15, 10),
title="test",
ax=ax,
)
plt.grid()
fig.savefig(
image_path_backtest,
bbox_inches="tight",
)
【问题讨论】:
标签: python-3.x pandas matplotlib