pes2014/createLoadProfileFigure.m

50 lines
1.6 KiB
Matlab

function createfigure(VertexNormals1, YData1, XData1, Vertices1, Faces1, X1, YMatrix1)
%CREATEFIGURE(VERTEXNORMALS1,YDATA1,XDATA1,VERTICES1,FACES1,X1,YMATRIX1)
% VERTEXNORMALS1: patch vertexnormals
% YDATA1: patch ydata
% XDATA1: patch xdata
% VERTICES1: patch vertices
% FACES1: patch faces
% X1: vector of x data
% YMATRIX1: matrix of y data
% Auto-generated by MATLAB on 11-Feb-2015 22:03:00
% Create figure
figure1 = figure('Color',[1 1 1]);
% Create axes
axes1 = axes('Parent',figure1,...
'XTickLabel',{'6:00','12:00','16:00','24:00','0:00'},...
'XTick',[24 48 72 96 1],...
'Position',[0.13 0.11 0.373795066413662 0.585744680851064],...
'FontName','Times New Roman');
% Uncomment the following line to preserve the X-limits of the axes
xlim(axes1,[1 96]);
hold(axes1,'all');
% Create patch
patch('Parent',axes1,'VertexNormals',VertexNormals1,'YData',YData1,...
'XData',XData1,...
'Vertices',Vertices1,...
'Faces',Faces1,...
'FaceColor',[0.901960784313726 0.901960784313726 0.901960784313726],...
'EdgeColor','none');
% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1,'Parent',axes1,'LineStyle','--','Color',[0 0 0]);
set(plot1(2),'DisplayName','边界');
set(plot1(3),'DisplayName','负荷曲线','LineStyle','-');
% Create xlabel
xlabel('时刻/时','FontSize',12,'FontName','黑体');
% Create ylabel
ylabel('负荷/kW','FontSize',12,'FontName','黑体');
% Create legend
legend1 = legend(axes1,'show');
set(legend1,...
'Position',[0.155913978494625 0.517021276595745 0.108159392789374 0.168794326241135]);