I have a code (below) which plots simple x, y data. My time (x-axis) was originally in numbers from 1-1257 which corresponded to the number of days I was looking at. I converted that to serial dates in order to plot it. However, when it is plotted in MATLAB, there isn't enough labels on the x-axis. When I try to set more tick marks, I either get the labels back in serial format (I want 'mmm yyyy' format), or when I try NumTicks, I get a lot of labels, but they are incorrect since they are just the original labels repeated several times.
% Find indexes at which the lat and lon match the conditions
lon_ind = find(X(:,1) == 224); % Longitude closest to 136 03.56W
lat_ind = find(Y(1,:) == -66.75); % Latitude closest to 66 39.67S
% Pull out all the data at the point 2240W and 66.75
data_point = data_All(lon_ind, lat_ind, :);
t = 1:1257; % Days 1:1257 inclusive. 20100101 to 20130611
y = reshape(data_point,[],1); % Change data_point into a 1 column matrix
x = datenum(2009, 12, 31) + t; % Convert t into serial numbers
% str = datestr(x, 'mmm yyyy'); % Choose format for x-axis
plot(x, y); % Plot data
datetick('x','mmm yyyy','keeplimits', 'keepticks'); % Set parameters
% NumTicks = 30;
% L = get(gca,'XLim');
% set(gca,'XTick',linspace(L(1),L(2),NumTicks))
set(gca,'XMinorTick','on','YMinorTick','on'); % Add minor ticks (without labels)
How can I make it so the x-axis has more labels in the 'mmm yyyy' format?

