Matplotlib adjust figure margin

后端 未结 7 779
盖世英雄少女心
盖世英雄少女心 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:26

    You should use add_axes if you want exact control of the figure layout. eg.

    left = 0.05
    bottom = 0.05 
    width = 0.9
    height = 0.9
    ax = fig.add_axes([left, bottom, width, height])
    

提交回复
热议问题