给定ax = plt.subplot()
可以将ax.bar()[0]
传递给plt.legend()
。
但是,ax.bar3d()
返回None
。如何为显示的栏创建图例?
更新:
将legend=“东西”传递给ax.bar3d()
,然后调用ax.legend()
引发
/usr/lib/python2.6/site-packages/matplotlib/axes.py:4368: UserWarning: No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
https://stackoverflow.com/questions/5803015
复制相似问题