I have two datasets with 1100x1 double. The rows represent different time points, while the values within each cell of the dataset represent a certain width. Therefore, there are 1100 time points. Matlab treats these data as starting from time zero. However, recording started from time -100.
When I plot these data on the same figure (with Matlab 2018a)
the x and y axis are automatically placed on the bottom (the x axis) and left (y axis) of the plot. I would like to move the axes to time point 0 and width 0.
I can move the x axis with:
ax.XAxisLocation = 'origin';
However, I cannot do the same for the y axis, as Matlab uses as 'origin' for the y axis the default (0,0), rather than the (100,0).
I know that I could simply draw a new line to create the new y axis with
plot([100 100], ylim, 'k-', 'LineWidth',1);
but I want to keep ticks and tick labels as they are in the default settings.
How can I move the y axis? Is thre a way to do something like this: ax = gca; ax.YAxisLocation = (ax.XLim(1)+100); %which doesn't working