MATLAB: Plotting a box plot and a time series on the same graph ? as a distribution over time. boxplot(re​shape(flux​O2tom01and​23,4,[])); and plot(o_opt​ode_mean1,​1:196)

graphplot

boxplot(reshape(fluxO2tom01and23,4,[])); and
plot(o_optode_mean1,1:196),
I have tried
yyaxis left;
hAxL=gca;
boxplot(reshape(fluxO2tom01and23,4,[]));
yyaxis right;
hAxR=gca; %
plot(o_optode_mean1,1:196)
ylim(hAxL);
linkaxes([hAxL hAxR],'xy');
but it does not work, any ideas?

Best Answer

I answered this in the previous Q? in response to the comment after you said you didn't have yyaxis, Rebecca... Answer_331785 (follow comments)