Matplotlib adjust figure margin

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

    tight_layout(pad=0) will meet your need. http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.tight_layout

提交回复
热议问题