外面的图例和调整子图大小缩小图片

时间:2014-05-09 07:40:21

标签: python matplotlib pandas

图例外的情节和调整子图大小缩小图片。怎么可能修复它?

import pandas as pd
import matplotlib.pyplot as plt
a = {'Test1': {1: 21867186, 4: 20145576, 10: 18018537},
'Test2': {1: 23256313, 4: 21668216, 10: 19795367}}

d = pd.DataFrame(a).T
f = plt.figure()

plt.title('Title here!', color='black')

d.plot(kind='bar', ax=f.gca())
plt.legend(loc='center left', bbox_to_anchor=(1.0, 0.5))
plt.subplots_adjust(bottom=.25, right=.25)

plt.show()

0 个答案:

没有答案