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