Hello, I have a graph with dates as X axis (datetime variables) I'm trying to stretch a rectangle over certain dates (I have the dates stored in a vector), but the problem is that the X axis is datetime and the Y axis is doubles, so MATLAB throws an error. How can I fix this?
for I = 1:1:length(main_idleDateMat(:,1)) startX = main_idleDateMat(I,1); endX = main_idleDateMat(I,2); rectangle('Position', [startX idleVecStartHeights(I)-80 (endX - startX) 160]); end
Best Answer