function [ ] = EntwicklungStromerzeugungErneuerbareEnergien( )
% The code generates only a basic image.
% The final work has to be done in inkscape.
% by Jahobr 2020-08-30 (update 2024-11-24)
%fontToUse = 'Helvetica Narrow'; % no support
fontToUse = 'Helvetica';
set(0, 'defaultAxesFontName', fontToUse)
set(0, 'defaultTextFontName', fontToUse)
foSizeToUse = 13;
set(0, 'DefaultTextFontSize', foSizeToUse);
set(0, 'DefaultAxesFontSize', foSizeToUse);
%% ##################### Data #########################
% https://www.bmwk.de/Redaktion/DE/Downloads/Energie/zeitreihen-zur-entwicklung-der-erneuerbaren-energien-in-deutschland-1990-2023.pdf?__blob=publicationFile&v=6
% Zeitreihen zur Entwicklung der erneuerbaren Energien in Deutschland
% unter Verwendung von Daten der Arbeitsgruppe Erneuerbare Energien-Statistik
% (AGEE-Stat)(Stand: Oktober 2024)
% Tabelle 3: Bruttostromerzeugung aus erneuerbaren Energien 1990 bis 2023
% Page 6/50
x = [...
1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023];
y = [
17426,14891,17397,17878,19930,21780,21957,17357,17216,19647,21732,22733,23124,18322,20745,19638,20031,21170,20443,19031,20953,17671,21755,22998,19587,18977,20546,20150,18098, 20135, 18721,19657,17625, 19894; ... Wasserkraft
72, 102, 281, 612, 927, 1530, 2073, 3025, 4579, 5639, 9703,10719,16102,19087,26019,27774,31324,40507,41385,39382,38371,49280,50948,51819,57026,72340,67650,88018,90484,101150,104796,89795,99692,116651; ... Windenergie an Land
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 176, 577, 732, 918, 1471, 8284,12274,17675,19467, 24744, 27306,24374,25124, 23887; ... Windenergie auf See
1, 1, 4, 3, 7, 7, 12, 18, 36, 31, 61, 78, 166, 320, 568, 1308, 2265, 3137, 4508, 6715,11963,19991,26744,30621,35448,38076,37556,38761,44330, 45211, 49496,50612,61022, 63576; ... Photovoltaik
4, 9, 14, 32, 51, 85, 118, 179, 210, 246, 925, 1112, 1485, 3392, 5162, 7478, 8819, 8699, 9296, 9746,10351,10516,10693,10555,10798,11034,10797,10644,11068, 11038, 11306,10738,10663, 9996; ... biogene Festbrennstoffe
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 20, 54, 142, 121, 749, 987, 1133, 1700, 1331, 398, 355, 299, 347, 443, 508, 454, 397, 344, 320, 210, 91, 105; ... biogene flüssige Brennstoffe
1, 2, 3, 4, 6, 18, 31, 44, 118, 145, 445, 745, 1046, 1614, 1181, 1803, 3557, 8915,11648,14020,16265,19936,25920,27468,28614,30086,30726,31089,30266, 30106, 30671,30552,30469, 28387; ... Biogas
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 46, 81, 385, 596, 1117, 1713, 2512, 3147, 3146, 2966, 2980, 2990, 3046, 3273, 3098, 3120; ... Biomethan
29, 25, 20, 24, 27, 34, 41, 48, 633, 727, 705, 735, 777, 955, 986, 1096, 1057, 1033, 1094, 1131, 1203, 1280, 1314, 1308, 1336, 1389, 1440, 1460, 1555, 1581, 1579, 1576, 1547, 1529; ... Klärgas
188, 224, 259, 372, 485, 525, 565, 605, 677, 727, 812, 748, 771, 793, 988, 1068, 1092, 1009, 864, 788, 674, 628, 536, 483, 435, 396, 358, 338, 305, 287, 247, 229, 201, 187; ... Deponiegas
1213, 1211, 1262, 1203, 1306, 1348, 1343, 1397, 1618, 1740, 1844, 1859, 1949, 2238, 2253, 3252, 3901, 4521, 4671, 4323, 4746, 4755, 4951, 5415, 6069, 5768, 5930, 5956, 6163, 5806, 5820, 5792, 5628, 5704; ... biogener Anteil des Abfalls
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2, 0.2, 0.4, 0.4, 18, 19, 28, 19, 25, 80, 98, 133, 175, 163, 178, 197, 231, 244, 206, 195; ... Geothermie
]; %
LegendText{1} = 'Wasserkraft';
LegendText{2} = 'Windenergie an Land';
LegendText{3} = 'Windenergie auf See';
LegendText{4} = 'Photovoltaik';
LegendText{5} = 'biogene Festbrennstoffe';
LegendText{6} = 'biogene flüssige Brennstoffe';
LegendText{7} = 'Biogas';
LegendText{8} = 'Biomethan';
LegendText{9} = 'Klärgas';
LegendText{10} = 'Deponiegas';
LegendText{11} = 'biogener Anteil des Abfalls';
LegendText{12} = 'Geothermie';
%% ########################### full plot #######################
colmap = [...
0 0.2 0.6; ... Wasserkraft
0.0 0.8 1 ; ... Windenergie an Land
0.3 0.6 1 ; ... Windenergie auf See
1 0.7 0.1; ... Photovoltaik
0 0.3 0 ; ... biogene Festbrennstoffe
0 1 0.5; ... biogene flüssige Brennstoffe
0.5 1 0 ; ... Biogas
1 0.5 1 ; ... Biomethan
0.7 0.3 0.1; ... Klärgas
0.5 0.5 0 ; ... Deponiegas
0.8 0.7 0.1; ... biogener Anteil des Abfalls
1 0 0 ; ... Geothermie
]; %
figH = figure(55823); clf;
axeH = axes;
hold on; box off; grid on
set(figH,'Position',[900 90 812 538])
xLimits = x([1 end]);
xlim(xLimits)
set(axeH,'XTick',x(1:2:end));
set(axeH,'YTick',0:20:ceil(y(:,end)/10)*10);
set(axeH,'XMinorTick','on');
set(axeH,'YMinorTick','on');
hh = area(x',y'/1000,...
'LineStyle','none');
ylabel('Stromerzeugung [TWh]')
legend(flip(hh),flip(LegendText),'Location','NorthWest'); % flip order to match the order in the plot
for idx = 1:numel(LegendText) % set colors
hh(idx).FaceColor = colmap(idx,:);
end
%% ########################### reduced plot #######################
y2(1 ,:) = y(1,:); % Wasserkraft
y2(6 ,:) = y(2,:); % Windenergie an Land
y2(5 ,:) = y(3,:); % Windenergie auf See
y2(7 ,:) = y(4,:); % Photovoltaik
y2(3 ,:) = y(5,:) + y(6,:); % biogene Festbrennstoffe + biogene flüssige Brennstoffe
y2(2 ,:) = y(7,:) + y(8,:); % Biogas + Biomethan
y2(4 ,:) = y(9,:) + y(10,:) + y(11,:); % Klärgas+ Deponiegas + biogener Anteil des Abfalls
% y2(8,:) = y(12,:); % Geothermie too small to see
y2 = y2/1000; % from GWh to TWh
LegendText2{1} = 'Wasserkraft';
LegendText2{6} = 'Windenergie Land';
LegendText2{5} = 'Windenergie See';
LegendText2{7} = 'Photovoltaik';
LegendText2{3} = 'biogene Brennstoffe (fest + flüssig)';
LegendText2{2} = 'Biogas + Biomethan';
LegendText2{4} = 'biogener Anteil des Abfalls + Klär- & Deponiegas';
colmap2(1 ,:) = [0 0.2 0.6]; ... Wasserkraft
colmap2(6 ,:) = [0.0 0.8 1 ]; ... Windenergie an Land
colmap2(5 ,:) = [0.3 0.6 1 ]; ... Windenergie auf See
colmap2(7 ,:) = [1 0.7 0.1]; ... Photovoltaik
colmap2(3 ,:) = [0 0.5 0 ]; ... biogene Brennstoffe
colmap2(2 ,:) = [0.5 1 0 ]; ... Biogas + Biomethan
colmap2(4 ,:) = [0.7 0.3 0.1]; ... Klärgas+ Deponiegas + biogener Anteil des Abfalls
figH = figure(55824); clf;
axeH = axes;
hold on; box off; grid on
set(figH,'Position',[90 60 812 538])
% set(axeH,'GridColor',[0.5 0.5 0.5]);
% set(axeH,'GridLineStyle','-');
% set(axeH,'GridAlphaMode','manual');
% set(axeH,'GridAlpha','0.15');
xLimits = x([1 end]);
xlim(xLimits)
yLimits = [0 ceil(sum(y2(:,end))/10)*10];
ylim(yLimits)
% set(axeH,'XTick',x(1:2:end));
% set(axeH,'YTick',0:20:yLimits(2));
% set(axeH,'XMinorTick','on');
% set(axeH,'YMinorTick','on');
axeH.XTick = x(1:1:end);
axeH.YTick = 0:20:yLimits(2);
axeH.XMinorTick = 'off';
axeH.YMinorTick = 'off';
axeH.TickDir = 'out';
for idx = 2:2:numel(axeH.XTickLabel) % remove every second Tick
axeH.XTickLabel{idx} = '';
end
hh = area(x',y2',...
'LineStyle','none');
ylabel('Stromerzeugung [TWh]')
legend(flip(hh),flip(LegendText2),'Location','NorthWest'); % flip order to match the order in the plot
for idx = 1:numel(LegendText2) % set colors
hh(idx).FaceColor = colmap2(idx,:);
end
plot([1 1]*1991,[19 31],'-k','HandleVisibility','off')
text(1990.2,31,{'StromEinspG';'ab Jan. 1991'},...
'BackgroundColor',[1 1 1],...
'HorizontalAlignment', 'left', ... left center right
'VerticalAlignment','bottom',... top cap middle baseline bottom
'Margin',1); %
plot([1 1]*1997+(10/12),[27 90],'-k','HandleVisibility','off')
text(1997,60,{'Novelle BauGB ';'ab Nov. 1997 '},...
'BackgroundColor',[1 1 1],...
'HorizontalAlignment', 'center', ... left center right
'VerticalAlignment','bottom',... top cap middle baseline bottom
'Margin',1); %
plot([1 1]*2000+(3/12),[39 90],'-k','HandleVisibility','off')
text(2000+(3/12),90,{'EEG';'ab April 2000'},...
'BackgroundColor',[1 1 1],...
'HorizontalAlignment', 'center', ... left center right
'VerticalAlignment','bottom',... top cap middle baseline bottom
'Margin',1); %
plot([1 1]*2004+(7/12),[63 120],'-k','HandleVisibility','off')
text(2004+(7/12),120,{'EEG 2004';'ab Aug. 2004'},...
'BackgroundColor',[1 1 1],...
'HorizontalAlignment', 'center', ... left center right
'VerticalAlignment','bottom',... top cap middle baseline bottom
'Margin',1); %
plot([1 1]*2009,[98 150],'-k','HandleVisibility','off')
text(2009,150,{'EEG 2009';'ab Jan. 2009'},...
'BackgroundColor',[1 1 1],...
'HorizontalAlignment', 'center', ... left center right
'VerticalAlignment','bottom',... top cap middle baseline bottom
'Margin',1); %
print(figH,'EntwicklungStromerzeugungErneuerbareEnergien.svg','-dsvg');
%plot2svg('EntwicklungStromerzeugungErneuerbareEnergien.svg',figH) % by Juerg Schwizer, See http://www.zhinst.com/blogs/schwizer/
% now follows "post-production" using inkscape
end