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

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

    The easiest way to get rid of the the ugly frame in newer versions of matplotlib:

    import matplotlib.pyplot as plt
    plt.box(False)
    

    If you really must always use the object oriented approach, then do: ax.set_frame_on(False).

提交回复
热议问题