答案 0 :(得分:1)
我建议使用add_axes
函数:
默认情况下,画布的x和y尺寸范围为0到1。 add_axes
在此处添加和轴,接受矩形[left,bottom,width,height]
。 E.g:
f=plt.gcf()
f.add_axes([0.1,0.8,0.1,0.1],axisbg='g')
f.add_axes([0.25,0.1,0.45,0.8],axisbg='r')
f.add_axes([0.8,0.4,0.15,0.5],axisbg='y')
f.add_axes([0.9,0.2,0.05,0.05],axisbg='b')
f.set_size_inches(10,6)
f.savefig('yourfig.png')