Xticklabels error too many input arguments
显示 更早的评论
I have a time series for the years 1993-2003 which i want to extend to 1993-2010
My code for the table 1993-2003 is
x = linspace(1,11,11);
y = percentincomeriskshared93_03;
yyaxis left
plot(x,y)
ytickformat('percentage')
ylabel('Percent of Risk Shared')
z = meanoflogassets_gdp_93_03;
yyaxis right
plot(x,z)
ylim([-0.8,0.4])
ylabel('Natural Log. of (assets/GDP)')
xticks([ 1 2 3 4 5 6 7 8 9 10 11])
xticklabels({'1993','1994', '1995', '1996', '1997', '1998','1999','2000', '2001','2002','2003'})
title('Income risk sharing and foreign asset holdings in the OECD 1993-2003')
I want to do the same for 1993-2010 and i just changed xticks to 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
and xticklabels to 1993 until 2010
but then I get the error "too many input arguments". Is there an alternative for xticklabels or is it really not possible to label the x axis according to 18 years?
1 个评论
Walter Roberson
2023-2-26
What shows up for
which -all xticklabels
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
