-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeo_plot3.m
More file actions
94 lines (81 loc) · 2.67 KB
/
geo_plot3.m
File metadata and controls
94 lines (81 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
% renewable supplies
clear;
length = 288;
a = 10;
W1 = load('traces/wind_supply_week.csv');
S1 = load('traces/solar_supply_week.csv');
for i = 1:1:length
S(i,:) = max(0,S1(2*i-1,:));
W(i,:) = W1(i,:);
end
s_mean = mean(S(1:length,:));
w_mean = mean(W(1:length,:));
for i = 1:1:a
S(:,i) = S(:,i)/s_mean(i);
W(:,i) = W(:,i)/w_mean(i);
W2(:,i) = W1(:,i)/max(W1(:,i))*30;
end
figure;
plot(1/6:1/6:288/6,S(:,1),'k',1/6:1/6:288/6,S(:,7),'r',1/6:1/6:288/6,S(:,4),'m',1/6:1/6:288/6,S(:,9),'b');
hold on
plot(1/6:1/6:288/6,mean(S(:,:)'),'b','LineWidth',3)
xlabel('hour');
ylabel('normalized GHI');
xlim([0,576/12]);
ylim([0,15]);
%set(gca,'YTick',[0:1:16]);
set(gca,'XTick',[0:6:576/12]);
set (gcf, 'PaperUnits', 'inches', 'PaperPosition', [0.1 0 3.6 2.8]);
legend('CA', 'TX', 'IL', 'NC','Average')
print ('-depsc', 'figs/solarTwoDay.eps');
figure;
h1 = plot(1/6:1/6:288/6,S(:,1),'k',1/6:1/6:288/6,S(:,7),'r',1/6:1/6:288/6,S(:,4),'m',1/6:1/6:288/6,S(:,9),'b');
hold on
h2 = plot(1/6:1/6:288/6,mean(S(:,:)'),'b','LineWidth',3)
xlabel('hour');
ylabel('normalized GHI');
xlim([0,576/12]);
ylim([0,15]);
set(gca,'XTick',[0:6:576/12]);
ah1 = gca;
l1 = legend(ah1,h1,'CA', 'TX', 'IL', 'NC', 2);
ah2=axes('position',get(gca,'position'), 'visible','off');
l2 = legend(ah2,h2,'Average',1);
LEG = findobj(l1,'type','text');
%set(LEG,'FontSize',10)
LEG = findobj(l2,'type','text');
%set(LEG,'FontSize',10)
set (gcf, 'PaperUnits', 'inches', 'PaperPosition', [0.1 0 2.8 2.1]);
print ('-depsc', 'figs/solarTwoDay.eps');
figure;
plot(1/6:1/6:288/6,W2(1:length,1),'k',1/6:1/6:288/6,W2(1:length,7),'r',1/6:1/6:288/6,W2(1:length,4),'m',1/6:1/6:288/6,W2(1:length,9),'b');
hold on
plot(1/6:1/6:288/6,mean(W2(1:length,:)'),'b','LineWidth',3)
xlabel('hour');
ylabel('wind power (kW)');
xlim([0,576/12]);
ylim([0,60]);
%set(gca,'YTick',[0:1:16]);
set(gca,'XTick',[0:6:576/12]);
set (gcf, 'PaperUnits', 'inches', 'PaperPosition', [0.1 0 3.6 2.8]);
legend('CA', 'TX', 'IL', 'NC','Average')
print ('-depsc', 'figs/windTwoDay.eps');
figure;
h1 = plot(1/6:1/6:288/6,W2(1:length,1),'k',1/6:1/6:288/6,W2(1:length,7),'r',1/6:1/6:288/6,W2(1:length,4),'m',1/6:1/6:288/6,W2(1:length,9),'b');
hold on
h2 = plot(1/6:1/6:288/6,mean(W2(1:length,:)'),'b','LineWidth',3);
xlabel('hour');
ylabel('wind power (kW)');
xlim([0,576/12]);
ylim([0,60]);
set(gca,'XTick',[0:6:576/12]);
ah1 = gca;
l1 = legend(ah1,h1,'CA', 'TX', 'IL', 'NC', 2);
ah2=axes('position',get(gca,'position'), 'visible','off');
l2 = legend(ah2,h2,'Average',1);
LEG = findobj(l1,'type','text');
%set(LEG,'FontSize',10)
LEG = findobj(l2,'type','text');
%set(LEG,'FontSize',10)
set (gcf, 'PaperUnits', 'inches', 'PaperPosition', [0.1 0 2.8 2.1]);
print ('-depsc', 'figs/windTwoDay.eps');