matlab - plot dates on x-axis with gap of 6 months -
i have cell of shape 1 x 1358 contains dates in string format. daily data on approx 5 years.
i have simple plot. on x-axis have dates not number or number of observations. want year , month shown , want label shown every 6 months.
how do this?
below have tried
ax1 = figure(1); ax1.xtick = pdates; datetick(ax1,'x','yy-mmm','keepticks');
here error message
error using datetick>parseinputs (line 325) incorrect arguments error in datetick (line 109) [axh,nin,ax,dateform,keep_ticks,keep_limits] = parseinputs(varargin); error in plot_variables (line 27) datetick(ax1,'x','yy-mmm','keepticks');
try may be
ax1 = gca; %// obtain current axis-handle ax1.xtick = pdates; datetick(ax1,'x','yy-mmm','keepticks');
Comments
Post a Comment