Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
812 B
2
Indexable
Never
import matplotlib.pyplot as plt
import numpy as np
ditet_e_javes=["E hene","E marte","E merkure","E enjte","E premte","E shtune","E djele"]
temperatura_java1=[30.4,25.2,31.5,33.6,24.5,18.9,22.3]
temperatura_java2=[33.4,28.2,32.9,35.6,29.9,21.9,25.3]
ngjyrat_java1=['red','yellow','blue','green','black','pink','brown']
ngjyrat_java2=['blue','yellow','blue','green','black','pink','brown']
bar_width=0.35
r1=np.arange(len(ditet_e_javes))
r2=[x+bar_width for x in r1]
plt.bar(r1,temperatura_java1,color=ngjyrat_java1,width=bar_width,edgecolor='grey',label='Java 1')
plt.bar(r2,temperatura_java2,color=ngjyrat_java2,width=bar_width,edgecolor='grey',label='Java 2')
plt.title("Temperatura ne Korce gjate 2 javeve")
plt.ylabel("Temperatura ne grade celsius")
plt.grid(axis='y')
plt.legend()
plt.show()
Leave a Comment