wolffd@0: wolffd@0: % Generate some test data. Assume that the X-axis represents months. wolffd@0: x = 1:12; wolffd@0: y = 10*rand(1,length(x)); wolffd@0: wolffd@0: % Plot the data. wolffd@0: h = plot(x,y,'+'); wolffd@0: wolffd@0: % Add a title. wolffd@0: title('This is a title') wolffd@0: wolffd@0: % Set the X-Tick locations so that every other month is labeled. wolffd@0: Xt = 1:2:11; wolffd@0: Xl = [1 12]; wolffd@0: set(gca,'XTick',Xt,'XLim',Xl); wolffd@0: wolffd@0: % Add the months as tick labels. wolffd@0: months = ['Jan'; wolffd@0: 'Feb'; wolffd@0: 'Mar'; wolffd@0: 'Apr'; wolffd@0: 'May'; wolffd@0: 'Jun'; wolffd@0: 'Jul'; wolffd@0: 'Aug'; wolffd@0: 'Sep'; wolffd@0: 'Oct'; wolffd@0: 'Nov'; wolffd@0: 'Dec']; wolffd@0: wolffd@0: set_xtick_label(months(1:2:12, :), 90, 'xaxis label'); wolffd@0: wolffd@0: wolffd@0: wolffd@0: if 0 wolffd@0: wolffd@0: wolffd@0: % Generate some test data. Assume that the X-axis represents months. wolffd@0: x = 1:8; wolffd@0: y = 10*rand(1,length(x)); wolffd@0: wolffd@0: % Plot the data. wolffd@0: h = plot(x,y,'+'); wolffd@0: wolffd@0: S = subsets(1:3); wolffd@0: str = cell(1,8); wolffd@0: for i=1:2^3 wolffd@0: str{i} = num2str(S{i}); wolffd@0: end wolffd@0: set_xtick_label(str); wolffd@0: wolffd@0: end