Dear all, the objective was to two x-Axes and y-Axes. However, I am unable to produce the intended graph even follow the MATLAB Example. The 2 signals does not overlap into each other, instead one of the signal cover entirely the first signal that being plot.
I really appreciate if someone can point what I have been missing. Thanks in advance
The following code has been used but without success.
load('st_data.mat');figureerrorbar(st_X_hour, st_Vec_Y1_mean, st_Vec_Y1_Sd, '--x','MarkerSize',15)ax1 = gca; % current axes
set(ax1, 'Xtick', st_Xaxis_intrmit, 'XTickLabel',st_XLabel,'XAxisLocation','top'); xtickangle(90)ax1_pos = ax1.Position; % position of first axes
ax2 = axes('Position',ax1_pos,'XAxisLocation','top','YAxisLocation','right', 'Color','none');plot(st_X_hour,st_Y2,'Parent',ax2,'Color','k')
Best Answer