function plot_demand_tree(sample_path,dt,t)
SSS = sample_path.D(1,size(sample_path.D,2)-9:size(sample_path.D,2))

S1_Demand_horizon = [SSS dt.S1_Demand_horizon];
S2_Demand_horizon = [SSS dt.S2_Demand_horizon];
S3_Demand_horizon = [SSS dt.S3_Demand_horizon];
S4_Demand_horizon = [SSS dt.S4_Demand_horizon];
S5_Demand_horizon = [SSS dt.S5_Demand_horizon];
S6_Demand_horizon = [SSS dt.S6_Demand_horizon];
S7_Demand_horizon = [SSS dt.S7_Demand_horizon];
S8_Demand_horizon = [SSS dt.S8_Demand_horizon];
S9_Demand_horizon = [SSS dt.S9_Demand_horizon];
t = -9:20

figure()
plot(t,S1_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S1_Demand_horizon(i),'o')
end
hold on
plot(t,S2_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S2_Demand_horizon(i),'o')
end
hold on
plot(t,S3_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S3_Demand_horizon(i),'o')
end
hold on
plot(t,S4_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S4_Demand_horizon(i),'o')
end
hold on
plot(t,S5_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S5_Demand_horizon(i),'o')
end
hold on
plot(t,S6_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S6_Demand_horizon(i),'o')
end
hold on
plot(t,S7_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S7_Demand_horizon(i),'o')
end
hold on
plot(t,S8_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S8_Demand_horizon(i),'o')
end
hold on
plot(t,S9_Demand_horizon)
for i = 11 : size(S1_Demand_horizon,2)
    hold on
    plot(t(i),S9_Demand_horizon(i),'o')
end

axis([t(1) 20 0 300])
xlabel('Time period, $t$','FontSize',30)
%legend('$Q_{S1,Demand}$','$Q_{S2,Demand}$','$Q_{S3,Demand}$','$Q_{S4,Demand}$','$Q_{S5,Demand}$','$Q_{S6,Demand}$','$Q_{S7,Demand}$','$Q_{S8,Demand}$','$Q_{S9,Demand}$');
ylabel('Energy Demand [MWh]','FontSize',30)
set(gca,'FontSize',30)
end

