import matplotlib
.pyplot
as plt
import numpy
as np
x
= np
.arange
(1,6,1)
y
= [0,4,3,5,6]
y1
= [1,3,4,2,7]
y2
= [3,4,1,6,5]
labels
= ["BluePlanet","BrownPlanet","GreenPlanet"]
colors
= ["#8da0cb","#fc8d62","#66c2a5"]
plt
.stackplot
(x
,y
,y1
,y2
,labels
=labels
,colors
=colors
)
plt
.legend
(loc
="upper left")
plt
.show
()
转载请注明原文地址:https://blackberry.8miu.com/read-7001.html