Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %**** Optional guidelines
- figure(1)
- plot([2 2],[0,1],'k--'); hold on
- %**** DATA
- N = 4;
- y=rand(5,N);
- x=1:1:5;
- for plotLoop=1:N;
- %* Plot
- figure(1)
- plot(x,y(plotLoop,:));
- hold on
- end
- %*****LEGEND
- hLegend = legend(LegTxt,...
- 'interpreter','latex',...
- 'location','eastoutside')
- %**** Optional guidelines for periodicity
- figure(1)
- plot([2 2],[0,1],'k--'); hold on
- %**** DATA
- N = 4;
- y=rand(5,N);
- x=1:1:5;
- for plotLoop=1:N;
- LegTxt{plotLoop} = num2str(plotLoop);
- %* Plot
- figure(1)
- % if statement to construct a handle for the legend later
- if plotLoop==1
- htot=plot(x,y(plotLoop,:));
- else
- h=plot(x,y(plotLoop,:));
- % Append this info to the figure handle
- htot= [htot, h];
- end
- hold on
- end
- %*****LEGEND
- hLegend = legend(htot,LegTxt,...
- 'interpreter','latex','FontSize',16,...
- 'location','eastoutside')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement