Practice 1
import matplotlib.pyplot as plt
days = [1,2,3,4,5]
sleeping = [7,8,7,9,7]
eating = [1,2,4,3,3]
working = [7,8,9,10,7]
playing = [5,7,8,10,3]
plt.plot([],[],color = 'c',label = 'sleeping')
plt.plot([],[],color = 'm',label = 'eating')
plt.plot([],[],color = 'r',label = 'working')
plt.plot([],[],color = 'b',label = 'playing')
plt.stackplot(days,sleeping,eating,working,playing,colors=['c','m','r','b',])
plt.xlabel('x')
plt.ylabel('y')
plt.title('Interesting GraphnCheck it out')
plt.legend()
plt.show()

最后
以上就是傻傻裙子最近收集整理的关于Matplotlib Tutorials 5 - Stack plots的全部内容,更多相关Matplotlib内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复