How to remove frame from matplotlib (pyplot.figure vs matplotlib.figure ) (frameon=False Problematic in matplotlib)

后端 未结 11 2161
猫巷女王i
猫巷女王i 2020-11-27 09:53

To remove frame in figure, I write

frameon=False

works perfect with pyplot.figure, but with matplotlib.Figure it

11条回答
  •  囚心锁ツ
    2020-11-27 10:10

    plt.axis('off')
    plt.savefig(file_path, bbox_inches="tight", pad_inches = 0)
    

    plt.savefig has those options in itself, just need to set axes off before

提交回复
热议问题