0

I am using the plotting pandas data frame and, saved the resulting figure using the following code. The output file looks weird when opened in image viewer as shown here.I don't understand why the background is not fully white.

I am using Linux OS called Zorin, which is a derivative of Ubuntu if that makes a difference.

enter image description here

    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",
        
    )
nyan314sn
  • 1,766
  • 3
  • 17
  • 29

1 Answers1

0

This is the default behaviour, you can set the background color using: fig.patch.set_facecolor('white')

mozway
  • 194,879
  • 13
  • 39
  • 75