File:Wind power installed capacity in Romania MW.svg

Summary

Description
Deutsch: Installierte Kapazität zur Windenergieerzeugung in Rumänien in MW
English: This plot shows a Bar Chart of the installed Wind power capacity in Romania. You find the Python code to regenerate this SVG below. Please update the data in the future ! Data from Windenergie_in_Rumänien
Date
Source Own work
Author MTheiler
SVG development
InfoField
Source code
InfoField

Python code

Source code
# Bar Chart with Matplotlib
# Data from https://de.wikipedia.org/wiki/Windenergie_in_Rum%C3%A4nien

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker

# label of y-axis
plt.title('Wind power installed capacity in Romania (MW)')
plt.ylabel('MW')

#Format= ['show y/n', year , capacity ]

data=[
['x',2010 ,389  ] ,
[' ',2011 ,988  ] ,
[' ',2012 ,1822 ] ,
[' ',2013 ,2599 ] ,
[' ',2014 ,2953 ] ,
['x',2015 ,2976 ] ,
[' ',2016 ,3024 ] ,
[' ',2017 ,3029 ] ,
[' ',2018 ,3029 ] ,
[' ',2019 ,3029 ] ,
['x',2020 ,3029 ] ,
[' ',2021 ,3029 ] ,
[' ',2022 ,3029 ] ,
[' ',2023 ,3100 ] 
]    
# please update in future.

show_yesno = np.array([row[0] for row in data])
all_years  = np.array([row[1] for row in data])

bar_labels = []

# show axis-labels only the years marked with 'x'
for i, yesNo in enumerate(show_yesno):
    if (yesNo == 'x'):
        bar_labels.append(all_years[i])
    else:
        bar_labels.append("")

bar_heights     = np.array([row[2] for row in data])

plt.xticks(range(len(bar_heights)), bar_labels  )

plt.bar(range(len(bar_heights)), bar_heights)

plt.savefig('Wind_power_installed_capacity_in_Romania_MW.svg', format='svg')
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Wind%20power%20installed%20capacity%20in%20Romania%20MW.svg
Category:Self-published work
Category:Wind power in Romania Category:Charts showing data through 2023 Category:Wind energy statistics Category:Renewable energy charts in unspecified languages
Category:CC-BY-SA-4.0 Category:Charts showing data through 2023 Category:Renewable energy charts in unspecified languages Category:Self-published work Category:Valid SVG created with Matplotlib code Category:Wind energy statistics Category:Wind power in Romania