How to insert caption in a linear graph with 3 vectors on the Y-axis?

Asked

Viewed 306 times

0

x=['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez']
y=[]
z=[]
w=[]
for i in range (0,12,1):
    soma=np.sum(mprod[:,i])
    y.append(int(soma))
for j in range (0,12,1):
    estoque=np.sum(resultado[:,j])
    w.append(int(estoque))
for k in range (0,12,1):
    vendas=np.sum(totvendas[:,k])
    z.append(int(vendas))
plt.plot(x,y,'ro-',x,z,'go-',x,w,'bo-')
plt.title("Produção x Vendas x Estoque")
plt.grid(True)
plt.legend()
plt.xlabel("Mêses")
plt.show()
  • What output do you expect to get? You can put an example?

1 answer

1

barter

plt.plot(x,y,'ro-',x,z,'go-',x,w,'bo-')

for

plt.plot(x,y, 'ro-', label='y')
plt.plot(x,z, 'go-', label='z')
plt.plot(x,w, 'bo-', label='w')

Browser other questions tagged

You are not signed in. Login or sign up in order to post.