I have 9 variables, which I am plotting over time and would like to dsiplay it in the line graph(plot). How do I do it? plot(dates, assetP); % legend('y=IEI', 'y=IEF', 'y=SHY', 'y=TLH','y=TLT', 'y=TIP', 'y=AGZ', 'y=CIU',… % 'y=HYG' ,'Location','southwest') hold on; plot(dates, benchmarkP, 'LineWidth', 3, 'Color', 'k'); hold off; xlabel('Date'); ylabel('Normalized Price'); title('Normalized Asset Prices and Benchmark'); datetick('x'); grid on;
MATLAB: Displaying names of multiple variables in a plot
MATLAB
Related Question
- Do “datenum” and “datestr” not give the same date after conversion
- How to use custom date labels for the x-axis in MATLAB plots
- How to obtain the coordinates of the mouse on the screen displayed somewhere in the figure window
- How to change the axis limit when I have 2 axes in the figure
- How do you find and replace rows in two tables with some variables in common
- Is implementing the “fft” formula in documentation giving me opposite sign for imaginary part
- Does ‘varfun’ exclude rows with an empty cell
Best Answer