Matplotlib adjust figure margin

后端 未结 7 848
盖世英雄少女心
盖世英雄少女心 2021-01-31 15:48

The following code gives me a plot with significant margins above and below the figure. I don\'t know how to eliminate the noticeable margins. subplots_adjust does

7条回答
  •  终归单人心
    2021-01-31 16:22

    You can use like: plt.subplots_adjust(wspace=1, hspace=0.5,left=0.1,top=0.9,right=0.9,bottom=0.1) And delete the item:bbox_inches='tight' in plt.savefig().

提交回复
热议问题