Below is my code for plotting: It should only display 6 values (as defined by linspace) any help would be genuinely appreciated!
stairs(eNumbers,eStages,'Color',[0,0.25,0.63],'LineWidth',1.5);title(eProfile.subjectID);xlabel('Time (mins)');ax=gca;ax.Color=[0.81 0.81 0.81];eTicks = linspace(eTimes(1),eTimes(end),6);xlim([1 size(eStages,2)]) ax.XTickLabel=eTicks;ax.YDir='reverse';ax.YTick = [0 1 2 3 4];ax.YTickLabel={'Awake','REM',' Stage 1','Stage 2','Stage 3'};ax.YGrid = 'on';
Best Answer