縦に並んだ円グラフを生成するコード ブロックがあります。
import matplotlib.pyplot as plt
import numpy
labels=['Ph 1', 'Ph 2','Ph 3']
colors = ['darkred', 'gold', 'green']
explode = (0.1, 0.1, 0.1)
event1=numpy.array([93.90,0.45,5.65])
event2=numpy.array([82.96,0.86,16.17])
event3=numpy.array([69.25,1.20,29.55])
fig1, (ax1,ax2,ax3)=plt.subplots(3,1,subplot_kw={'aspect':'equal'})
ax2.legend(labels, loc=(-0.05, 0.05), shadow=True)
ax1.pie(event1, explode=explode, colors=colors)
ax2.pie(event2, explode=explode, colors=colors)
ax3.pie(event3, explode=explode, colors=colors)
plt.show()
凡例を中央のパイに揃えて配置したいが、左側に配置したい. 今のところ、空で、読み取り不能で、間違った場所にある非常に小さな凡例が表示されます。それを修正する方法は?