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

后端 未结 11 2160
猫巷女王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:02

    As I answered here, you can remove spines from all your plots through style settings (style sheet or rcParams):

    import matplotlib as mpl
    
    mpl.rcParams['axes.spines.left'] = False
    mpl.rcParams['axes.spines.right'] = False
    mpl.rcParams['axes.spines.top'] = False
    mpl.rcParams['axes.spines.bottom'] = False
    

提交回复
热议问题