I have this code:
%datevc divides the date in different columns, first colum is the year, %second the month and thrid the day d=datevec(dates)
%Takes just the year (first column) d=d(:,1)
%takes every year just once [a,idx]=unique(d(:,1),'first')
this works fine, but the problem I faces is that the time series (y=VIX) does not start at the left end of the plot but instead there is a space between the y-axis and the first point of the time series. I know that when there are normal values on the x-axis, I can change it, but I am not able to do it with dates, what do I need to do?
No products are associated with this question.
This is still not a working example, the variable VIXdate is obviously unknown to us...
So the dirty way again:
ytix = get(gca,'YTick'); set(gca,'YTick',ytix(2:end));
You could also set just the x axis to be the same as your data: