Hi, I have tried different solutions online but nothing works. I have a row vector of dimension (1×19) where each value is for years 1995 to 2013. With below script, I get ticks for every other year, but I want it for each year. How can I do this?
y_data=rand(1,19);x = linspace(1995,2013,19);plot(x,y_data)xticks(1995:1:2013);xticklabels({'1995' '1996' '1997' '1998' '1999' '2000' '2001' '2002' '2003' '2004' '2005' '2006' '2007' '2008' '2009' '2010' '2011' '2012' '2013'})xlim([1995 2013]);
Best Answer