Artificial Intelligence
Please fill the required field.

Духовные ценности Российского народа


':(20,20)}, { 'DiveDedilMinno':(20,20)} ] fig = plt.figure(figsize=(11.7,8.27)) plt.subplots_adjust(left=0.1, bottom=0.1, right=0.7, top=0.9, wspace=0.02, hspace=0.02) subrows = 4 subcols = 4 subcounter = 0 for sub in Rpgraphs: if subcounter == subrows*subcols: break subcounter +=1 fig.add_subplot(subrows, subcols, subcounter) plt.bar(x=sub.keys(),height=sub.values(),alpha=0.5,color='darkcyan') plt.title(list(sub.keys())[0], fontweight='bold', color = 'black', fontsize='10') plt.show() fig = plt.figure(figsize=(11.7,8.27)) plt.subplots_adjust(left=0.1, bottom=0.1, right=0.7, top=0.9, wspace=0.02, hspace=0.02) subrows = 4 subcols = 4 subcounter = 0 for sub in Rpgraphs2: if subcounter == subrows*subcols: break subcounter +=1 fig.add_subplot(subrows, subcols, subcounter) # plt.bar(x=sub.keys(), height=sub.values(), alpha=0.5, color='darkcyan') plt.pie(sub.values(), labels=sub.keys(), autopct='%1.1f%%', shadow=True, startangle=90) plt.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle. plt.title(list(sub.keys())[0], fontweight='bold', color = 'black', fontsize='10') plt.show() Qtables['Russia'] Europe = { 'Source':[ 'https://en.wikipedia.org/wiki/List_of_European_countries_by_life_expectancy' ], 'European Countries:':[ 'Russia', 'Ukraine', 'France', 'Spain', 'Portugal', 'Italy', 'Belgium', 'United Kingdom', 'Netherlands', 'Romania', 'Greece', 'Sweden', 'Switzerland', 'Norway', 'Denmark', 'Finland', 'Slovakia', 'Austria', 'Hungary', 'Poland', 'Latvia', 'Lithuania', 'Estonia', 'Germany', 'Portugal' ] } Europedf = pd.DataFrame(Europe) Europedf = Europedf.set_index('European Countries:') Europedf Europepivoted = Europedf.pivot_table(columns='European Countries:') EuropeCountries = Europepivoted['Source'].sort_values(ascending=False) EuropeCountries Europedf = pd.DataFrame(Europe) Europedf = Europedf.set_index('European Countries:') Europedf Europedf.sort_values(by='Life Expectancy',ascending=False) EuropeLife = { 'France':82.3, 'Italy':82.3, 'Switzerland':83.1, 'Spain':82.09, 'Sweden':81.7, 'Norway':81.7, 'Austria':80.79, 'Netherlands':81.8, 'Germany':80.9, 'Finland':81.5, 'Denmark':81.34, 'Portugal':80.2, 'Poland':75.5, 'Czech Republic':78.1, 'Belgium':81.3, 'Greece':81.4, 'Turkey': 78.3, 'Hungary':75.4, 'Sweden':81.4, 'Switzerland':83.1, } ECg = { 'France': 'skyblue', 'Italy': 'greenyellow', 'Switzerland': 'gold', 'Spain': 'odetblue', 'Sweden': 'midnightblue', 'Norway': 'orangered', 'Austria': 'plum', 'Netherlands': 'black', 'Germany': 'darkgreen', 'Finland': 'bisque', 'Denmark': 'seagreen', 'Portugal': 'gray', 'Poland': 'lime', 'Czech Republic': 'purple', 'Belgium': 'magenta', 'Greece': 'indigo', 'Turkey': 'olive', 'Hungary': 'blue', } fig = plt.figure(figsize=(5,5)) plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9, wspace=0.0, hspace=0.0) subrows = 1 subcols = 1 subcounter = 0 for sub in EuropeLife: if subcounter == subrows*subcols: break subcounter +=1 plt.bar(x=sub,height=EuropeLife[sub],color=ECg[sub],alpha=.3) plt.title('Life Expectancy in Years') plt.ylabel('Life Expectancy') plt.xlabel('Selected European Countries') plt.figure(figsize=(1,10)) print(EuropeLife.values()) print(EuropeLife.keys()) tick_label = EuropeLife.keys() plt.legend(labels=tick_label, fontsize=5) plt.show() fig = plt.figure(figsize=(5,5)) plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9, wspace=0.0, hspace=0.0) subrows = 1 subcols = 1 subcounter = 0 for sub in EuropeLife: if subcounter == subrows*subcols: break plt.scatter(sorted(EuropeLife.keys()),EuropeLife.values()) plt.title('Life Expectancy in Years') plt.xlabel('European Country') plt.ylabel('Life Expectancy') plt.tight_layout() plt.ylim(75,83) plt.show() EuropeGDP = { 'Russia': 1.660, 'Ukraine':.369, 'France':2.969, 'Spain':1.4, 'Portugal':.237, 'Italy': .589, 'Belgium': .289, 'United Kingdom': 2.678, 'Netherlands':.821, 'Romania':.271, 'Greece':.209, 'Sweden':.569, 'Switzerland':.706, 'Norway':.509, 'Denmark':.361, 'Finland':.275, 'Slovakia':.103, 'Austria':.415, 'Hungary':.167, 'Poland':.549, 'Latvia':.034, 'Lithuania':.053, 'Estonia':.030, 'Denmark':.306, 'Luxembourg':.0771 } ECg = { 'Russia': 'red', 'Ukraine': 'blue', 'France': 'skyblue', 'Spain': 'darkblue', 'Portugal': 'purple', 'Italy': 'magenta', 'Belgium': 'midnightblue', 'United Kingdom': 'olive', 'Netherlands': 'darkcyan', 'Romania': 'gray', 'Greece': 'lightgray', 'Sweden': 'bisque', 'Switzerland': 'orange', 'Norway': 'black', 'Denmark': 'gold', 'Finland': 'greenyellow', 'Slovakia': 'navy', 'Austria': 'brown', 'Hungary': 'coral', 'Poland': 'crimson', 'Latvia': 'ivory', 'Lithuania': 'lightseagreen', 'Estonia': 'plum', 'Luxembourg': 'indigo', 'Denmark': 'brown' } print(EuropeGDP.values()) print(EuropeGDP.keys()) tick_label = EuropeGDP.keys() fig = plt.figure(figsize=(10,15)) plt.subplots_adjust(left=0.1, bottom=0.1, right=.5, top=1.0, wspace=0.5, hspace=0.3) subrows = 3 subcols = 3 subcounter = 0 for sub in EuropeGDP: if subcounter == subrows*subcols: break subcounter +=1 plt.barh(y=sub,height=EuropeGDP[sub],color=ECg[sub],alpha=1.0) plt.legend(labels=tick_label, loc=4) plt.title('European GDP') plt.xlabel('GDP Trillions') plt.ylabel('Selected European Countries') plt.figure(figsize=(10,10)) plt.show()