Python/Matplotlib - Change the relative size of a subplot

后端 未结 3 1633
盖世英雄少女心
盖世英雄少女心 2020-12-13 13:38

I have two plots

import matplotlib.pyplot as plt
plt.subplot(121)
plt.subplot(122)

I want plt.subplot(122) to be half as wide

3条回答
  •  悲哀的现实
    2020-12-13 14:25

    By simply specifying the geometry with “122”, you're implicitly getting the automatic, equal-sized columns-and-rows layout.

    To customise the layout grid, you need to get a little more specific. See “Customizing Location of Subplot Using GridSpec” in the Matplotlib docs.

提交回复
热议问题