我想把图例放在中心子图的位置(并删除它)。 我编写了以下代码:
import matplotlib.pylab as plt
import numpy as np
f, ax = plt.subplots(3,3)
x = np.linspace(0, 2. * np.pi, 1000)
y = np.sin(x)
for axis in ax.ravel():
axis.plot(x, y)
legend = axis.legend(loc='center')
plt.show()
我不知道如何隐藏一个中心图表。为什么图例没有出现?
这个链接没有帮助 http://matplotlib.org/1.3.0/examples/pylab_examples/legend_demo.html