I have a plot with 6 variables and 5 subplot. In one case, the third variable, I want it to display two lines in one graph. So far, it is fine. However, I also need confidence intervals to differ in shap for this subplot, the alternative ones should be dashaded while the others shaded. I don't know how to do it.
This is an example (data on attached excel file):
data = xlsread('prova.xls') % Data
lines = data(:, 1:5) line2 = data(:, 16) ci = data(:, 6:15)ci2 = data(:,17:18)k = 5 % plot
for j = 1:k subplot(3, 2, j); plot(lines(:,j), 'LineWidth',1,'Color', [0 0 0.5]); hold on if j == 3 plot(line2, 'LineWidth',1,'Color', [0 0 0.5], 'LineStyle','--') end hold onplot(ci,'LineWidth',1,'Color', [0 0 0.5],'LineStyle','--'); hold on % plot(ci2,'LineWidth',1,'Color', [0 0 0.5],'LineStyle','--'); % don't know how to plot it
% I tried: if j == 3
% plot(ci2, 'LineWidth',1,'Color', [0 0 0.5], 'LineStyle','--mo')
% end but it didn't work
yline(0, '-') end
I would like the code to be modified to embed: a) the confidence intervals of the second dataset only in subplot 3; b) a different confidence interval's style (shaded vs dashed). I am stuck and don't know how to do it unfortunately.
Is there anyone who can help me?
Thanks!
Best Answer