One approach is to explicitly set the "XTick" property of the axes using date number values. As an example, let's assume that you have sample data for the first 8424 hours of 2014:
x = datetime(2014,1,1,1,0,0):hours(1):datetime(2014,1,1,8424,0,0);
y = sin(2*pi*linspace(0,1,length(x)));
Note the "datetime" function used above is available in MATLAB R2014b and later. We can plot this data in a figure:
figure;
plot(x,y);
xlabel('Month in 2014');
ylabel('Output');
On my MATLAB R2014b, the output looks like this:
Now, to change the x-axis to include all month names in 2014, you can explicitly set the tick values. To do this, we first need an array containing all the of the months in 2014:
allMonths = datetime(2014,1,1,0,0,0):calmonths(1):datetime(2014,12,31,0,0,0);
Now, we can set the "XTick" property of the axes to create ticks at each of these month values. In order to do this, we also need to convert the sting values in "allMonths" into date numbers using the "datenum" function:
set(gca,'XTick',datenum(allMonths));
Finally, to make sure that "January" and "December" show up, let's set the x-axis limits to range to include the first and last months of 2014:
xlim(datenum([allMonths(1),allMonths(end)]));
On my MATLAB R2014b, the output now looks like:
See the documentation links below for more information.